Skip to content

Commit 8bada64

Browse files
dsymeKevinRansom
authored andcommitted
fix 6586 (#6621)
* fix 6586 * add test * add baseline
1 parent 9e835d3 commit 8bada64

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/fsharp/pars.fsy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ let mkDefnBindings (mWhole,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs,_bindi
132132
let idOfPat m p =
133133
match p with
134134
| SynPat.Named (SynPat.Wild _,id,false,_,_) -> id
135-
| SynPat.LongIdent(LongIdentWithDots([id],_),_,_,_,_,_) -> id
135+
| SynPat.LongIdent(LongIdentWithDots([id],_),_,None, SynConstructorArgs.Pats [], None,_) -> id
136136
| _ -> raiseParseErrorAt m (FSComp.SR.parsIntegerForLoopRequiresSimpleIdentifier())
137137

138138
let checkForMultipleAugmentations m a1 a2 =
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
neg115.fs(8,30,8,34): typecheck error FS0001: Expecting a type supporting the operator 'get_Item1' but given a tuple type
2+
neg115.fs(6,9,6,17): parse error FS0525: An integer for loop must use a simple identifier
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11

22
module M
33

4-
let inline test (arg: ^T when ^T : struct) =
5-
(^T : (member Item1: _) (arg))
4+
let foo x = x
65

7-
let f () =
8-
let a = test struct (1, 2)
9-
()
6+
for i foo 12 = 1 to 20 do
7+
printfn "%d" i
8+

0 commit comments

Comments
 (0)