diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 52bbef6d05a..453e5c56342 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -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 = diff --git a/tests/fsharp/typecheck/sigs/neg115.bsl b/tests/fsharp/typecheck/sigs/neg115.bsl index 02cc368dae7..4a6688603fe 100644 --- a/tests/fsharp/typecheck/sigs/neg115.bsl +++ b/tests/fsharp/typecheck/sigs/neg115.bsl @@ -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 diff --git a/tests/fsharp/typecheck/sigs/neg115.fs b/tests/fsharp/typecheck/sigs/neg115.fs index b99378cae23..58025572c71 100644 --- a/tests/fsharp/typecheck/sigs/neg115.fs +++ b/tests/fsharp/typecheck/sigs/neg115.fs @@ -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) - () \ No newline at end of file + for i foo 12 = 1 to 20 do + printfn "%d" i + \ No newline at end of file