Skip to content

Commit

Permalink
fix 6586 (#6621)
Browse files Browse the repository at this point in the history
* fix 6586

* add test

* add baseline
  • Loading branch information
dsyme authored and KevinRansom committed Apr 24, 2019
1 parent 9e835d3 commit 8bada64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/fsharp/pars.fsy
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ let mkDefnBindings (mWhole,BindingSetPreAttrs(_,isRec,isUse,declsPreAttrs,_bindi
let idOfPat m p =
match p with
| SynPat.Named (SynPat.Wild _,id,false,_,_) -> id
| SynPat.LongIdent(LongIdentWithDots([id],_),_,_,_,_,_) -> id
| SynPat.LongIdent(LongIdentWithDots([id],_),_,None, SynConstructorArgs.Pats [], None,_) -> id
| _ -> raiseParseErrorAt m (FSComp.SR.parsIntegerForLoopRequiresSimpleIdentifier())

let checkForMultipleAugmentations m a1 a2 =
Expand Down
2 changes: 1 addition & 1 deletion tests/fsharp/typecheck/sigs/neg115.bsl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

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

module M

let inline test (arg: ^T when ^T : struct) =
(^T : (member Item1: _) (arg))
let foo x = x

let f () =
let a = test struct (1, 2)
()
for i foo 12 = 1 to 20 do
printfn "%d" i

0 comments on commit 8bada64

Please sign in to comment.