Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 6586 #6621

Merged
merged 3 commits into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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