From a8680b2b4a0b2827ca7dbdcfec810616991e3228 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 23 Apr 2019 17:37:02 +0100 Subject: [PATCH 1/3] fix 6586 --- src/fsharp/pars.fsy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = From 7f9c4372998b6067953c8449fe289a4b6c2704b5 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 23 Apr 2019 17:41:19 +0100 Subject: [PATCH 2/3] add test --- tests/fsharp/typecheck/sigs/neg115.bsl | 2 -- tests/fsharp/typecheck/sigs/neg115.fs | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/fsharp/typecheck/sigs/neg115.bsl b/tests/fsharp/typecheck/sigs/neg115.bsl index 02cc368dae7..e69de29bb2d 100644 --- a/tests/fsharp/typecheck/sigs/neg115.bsl +++ b/tests/fsharp/typecheck/sigs/neg115.bsl @@ -1,2 +0,0 @@ - -neg115.fs(8,30,8,34): typecheck error FS0001: Expecting a type supporting the operator 'get_Item1' but given a tuple type 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 From c4d09139ca9a6059a070c2738ee73d3fd15d5004 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 23 Apr 2019 21:05:37 +0100 Subject: [PATCH 3/3] add baseline --- tests/fsharp/typecheck/sigs/neg115.bsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/fsharp/typecheck/sigs/neg115.bsl b/tests/fsharp/typecheck/sigs/neg115.bsl index e69de29bb2d..4a6688603fe 100644 --- a/tests/fsharp/typecheck/sigs/neg115.bsl +++ b/tests/fsharp/typecheck/sigs/neg115.bsl @@ -0,0 +1,2 @@ + +neg115.fs(6,9,6,17): parse error FS0525: An integer for loop must use a simple identifier