From 1799aaf29034f01357684c7716b6eed8fc76468a Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 23 Apr 2025 15:27:24 +0100 Subject: [PATCH 01/32] make attribute targets mismatches a warning and not an error. --- .../Checking/Expressions/CheckExpressions.fs | 2 +- .../AttributeUsage/AttributeUsage.fs | 215 +++++++++--------- .../CustomAttributes/Basic/Basic.fs | 7 +- .../EntryPoint/EntryPoint.fs | 2 +- .../LetBindings/Basic/Basic.fs | 4 +- .../ErrorMessages/TailCallAttribute.fs | 32 +-- 6 files changed, 125 insertions(+), 137 deletions(-) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 5f390038e35..e2d21975311 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -11367,7 +11367,7 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn if (directedTgts = AttributeTargets.Assembly || directedTgts = AttributeTargets.Module) then error(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElementUseDo(), mAttr)) else - error(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElement(), mAttr)) + warning(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElement(), mAttr)) match ResolveObjectConstructor cenv.nameResolver env.DisplayEnv mAttr ad ty with | Exception _ when canFail = TcCanFail.IgnoreAllErrors || canFail = TcCanFail.IgnoreMemberResoutionError -> [ ], true diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs index c7c2cf72eca..f027745b73e 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs @@ -104,10 +104,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 21, Col 21, Line 21, Col 22, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 21, Line 24, Col 29, "This attribute is not valid for use on this language element") - (Error 842, Line 27, Col 7, Line 27, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 7, Line 18, Col 8, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 21, Line 21, Col 22, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 21, Line 24, Col 29, "This attribute is not valid for use on this language element") + (Warning 842, Line 27, Col 7, Line 27, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 7, Line 18, Col 8, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargets02.fs # E_AttributeTargets02.fs @@ -117,9 +117,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 7, Line 14, Col 34, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 7, Line 24, Col 36, "This attribute is not valid for use on this language element") - (Error 842, Line 29, Col 15, Line 29, Col 47, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 7, Line 14, Col 34, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 7, Line 24, Col 36, "This attribute is not valid for use on this language element") + (Warning 842, Line 29, Col 15, Line 29, Col 47, "This attribute is not valid for use on this language element") + (Error 3172, Line 28, Col 14, Line 28, Col 17, "A property's getter and setter must have the same type. Property 'Foo' has getter of type 'int' but setter of type 'obj'.") ] // SOURCE=E_AttributeTargetIsField01.fs # E_AttributeTargetIsField01.fs @@ -140,23 +141,23 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 3, Line 9, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 12, Col 3, Line 12, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 3, Line 15, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 3, Line 18, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 3, Line 24, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 27, Col 3, Line 27, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 30, Col 3, Line 30, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 33, Col 3, Line 33, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 36, Col 3, Line 36, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 39, Col 3, Line 39, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 42, Col 3, Line 42, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 45, Col 3, Line 45, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 49, Col 3, Line 49, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 56, Col 3, Line 56, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 64, Col 3, Line 64, Col 12, "This attribute is not valid for use on this language element") - (Error 842, Line 66, Col 7, Line 66, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 9, Col 3, Line 9, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 3, Line 12, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 3, Line 15, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 3, Line 18, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 3, Line 24, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 27, Col 3, Line 27, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 30, Col 3, Line 30, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 33, Col 3, Line 33, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 36, Col 3, Line 36, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 39, Col 3, Line 39, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 42, Col 3, Line 42, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 45, Col 3, Line 45, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 49, Col 3, Line 49, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 56, Col 3, Line 56, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 64, Col 3, Line 64, Col 12, "This attribute is not valid for use on this language element") + (Warning 842, Line 66, Col 7, Line 66, Col 16, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsField02.fs # E_AttributeTargetIsField02.fs @@ -194,17 +195,17 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 3, Line 9, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 12, Col 3, Line 12, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 3, Line 15, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 3, Line 18, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 24, Col 3, Line 24, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 26, Col 7, Line 26, Col 17, "This attribute is not valid for use on this language element") - (Error 842, Line 28, Col 3, Line 28, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 31, Col 3, Line 31, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 3, Line 34, Col 13, "This attribute is not valid for use on this language element") - (Error 842, Line 39, Col 3, Line 39, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 9, Col 3, Line 9, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 3, Line 12, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 3, Line 15, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 3, Line 18, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 24, Col 3, Line 24, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 26, Col 7, Line 26, Col 17, "This attribute is not valid for use on this language element") + (Warning 842, Line 28, Col 3, Line 28, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 31, Col 3, Line 31, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 3, Line 34, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 39, Col 3, Line 39, Col 13, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsMethod03.fs # E_AttributeTargetIsMethod03.fs @@ -225,21 +226,21 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 12, Col 6, Line 12, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 6, Line 15, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 6, Line 18, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 10, Line 20, Col 20, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 6, Line 22, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 25, Col 6, Line 25, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 28, Col 6, Line 28, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 31, Col 6, Line 31, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 6, Line 34, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 37, Col 6, Line 37, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 39, Col 10, Line 39, Col 20, "This attribute is not valid for use on this language element") - (Error 842, Line 41, Col 6, Line 41, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 6, Line 44, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 47, Col 6, Line 47, Col 16, "This attribute is not valid for use on this language element") - (Error 842, Line 52, Col 6, Line 52, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 6, Line 12, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 6, Line 15, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 6, Line 18, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 10, Line 20, Col 20, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 6, Line 22, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 25, Col 6, Line 25, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 28, Col 6, Line 28, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 31, Col 6, Line 31, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 6, Line 34, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 37, Col 6, Line 37, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 39, Col 10, Line 39, Col 20, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 6, Line 41, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 6, Line 44, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 47, Col 6, Line 47, Col 16, "This attribute is not valid for use on this language element") + (Warning 842, Line 52, Col 6, Line 52, Col 16, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsMethod04.fs # E_AttributeTargetIsMethod04.fs @@ -250,8 +251,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 10, Col 3, Line 10, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 10, Col 3, Line 10, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") ] // SOURCE=E_ConditionalAttribute.fs SCFLAGS="--test:ErrorRanges" # E_ConditionalAttribute.fs @@ -293,7 +294,7 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 12, Col 3, Line 12, Col 6, "This attribute is not valid for use on this language element") + (Warning 842, Line 12, Col 3, Line 12, Col 6, "This attribute is not valid for use on this language element") ] // SOURCE=AttributeTargetIsStruct.fs # AttributeTargetIsStruct.fs @@ -342,18 +343,18 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 13, Col 3, Line 13, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 11, Line 22, Col 22, "This attribute is not valid for use on this language element") - (Error 842, Line 25, Col 3, Line 25, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 3, Line 34, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 35, Col 3, Line 35, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 40, Col 3, Line 40, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 41, Col 3, Line 41, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 49, Col 3, Line 49, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 50, Col 3, Line 50, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 53, Col 3, Line 53, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 54, Col 3, Line 54, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 13, Col 3, Line 13, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 11, Line 22, Col 22, "This attribute is not valid for use on this language element") + (Warning 842, Line 25, Col 3, Line 25, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 3, Line 34, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 35, Col 3, Line 35, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 40, Col 3, Line 40, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 3, Line 41, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 49, Col 3, Line 49, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 50, Col 3, Line 50, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 53, Col 3, Line 53, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 54, Col 3, Line 54, Col 18, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsClass.fs # E_AttributeTargetIsClass.fs @@ -372,9 +373,9 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 10, Line 22, Col 22, "This attribute is not valid for use on this language element") + (Warning 842, Line 13, Col 3, Line 13, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 10, Line 22, Col 22, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsClass01.fs # E_AttributeTargetIsClass01.fs @@ -393,8 +394,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 7, Col 3, Line 7, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 10, Col 10, Line 10, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 7, Col 3, Line 7, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 10, Col 10, Line 10, Col 25, "This attribute is not valid for use on this language element") ] // SOURCE=MarshalAsAttribute.fs # MarshalAsAttribute.fs @@ -480,7 +481,7 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsField03.fs # E_AttributeTargetIsField03.fs @@ -491,8 +492,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 5, Line 14, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsProperty01.fs # E_AttributeTargetIsField03.fs @@ -511,8 +512,8 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 5, Line 14, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 5, Line 14, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 5, Line 15, Col 25, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeTargetIsCtor01.fs # E_AttributeTargetIsCtor01.fs @@ -531,10 +532,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 15, Line 9, Col 27, "This attribute is not valid for use on this language element") - (Error 842, Line 11, Col 16, Line 11, Col 28, "This attribute is not valid for use on this language element") - (Error 842, Line 14, Col 15, Line 14, Col 27, "This attribute is not valid for use on this language element") - (Error 842, Line 17, Col 16, Line 17, Col 28, "This attribute is not valid for use on this language element") + (Warning 842, Line 9, Col 15, Line 9, Col 27, "This attribute is not valid for use on this language element") + (Warning 842, Line 11, Col 16, Line 11, Col 28, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 15, Line 14, Col 27, "This attribute is not valid for use on this language element") + (Warning 842, Line 17, Col 16, Line 17, Col 28, "This attribute is not valid for use on this language element") ] // SOURCE=AttributeTargetsIsEnum01.fs # AttributeTargetsIsEnum01.fs @@ -568,10 +569,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 3, Line 22, Col 17, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 3, Line 22, Col 17, "This attribute is not valid for use on this language element") ] // SOURCE=AttributeTargetsIsDelegate01.fs # AttributeTargetsIsDelegate01.fs @@ -605,10 +606,10 @@ module CustomAttributes_AttributeUsage = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 3, Line 20, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 22, Col 3, Line 22, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 3, Line 20, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 22, Col 3, Line 22, Col 13, "This attribute is not valid for use on this language element") ] [] @@ -654,10 +655,10 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 11, Col 3, Line 11, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 14, Col 3, Line 14, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 18, Col 3, Line 18, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 11, Col 3, Line 11, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 3, Line 14, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 18, Col 3, Line 18, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 19, Col 3, Line 19, Col 15, "This attribute is not valid for use on this language element") ] // SOURCE= E_AttributeTargetIsClass02.fs # E_AttributeTargetIsClass02.fs @@ -676,18 +677,18 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 15, Col 3, Line 15, Col 18, "This attribute is not valid for use on this language element"); - (Error 842, Line 16, Col 3, Line 16, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 26, Col 3, Line 26, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 27, Col 3, Line 27, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 34, Col 3, Line 34, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 35, Col 3, Line 35, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 43, Col 3, Line 43, Col 18, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 3, Line 44, Col 15, "This attribute is not valid for use on this language element") - (Error 842, Line 47, Col 3, Line 47, Col 14, "This attribute is not valid for use on this language element") - (Error 842, Line 48, Col 3, Line 48, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 3, Line 15, Col 18, "This attribute is not valid for use on this language element"); + (Warning 842, Line 16, Col 3, Line 16, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 20, Col 3, Line 20, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 21, Col 3, Line 21, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 26, Col 3, Line 26, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 27, Col 3, Line 27, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 34, Col 3, Line 34, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 35, Col 3, Line 35, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 43, Col 3, Line 43, Col 18, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 3, Line 44, Col 15, "This attribute is not valid for use on this language element") + (Warning 842, Line 47, Col 3, Line 47, Col 14, "This attribute is not valid for use on this language element") + (Warning 842, Line 48, Col 3, Line 48, Col 18, "This attribute is not valid for use on this language element") ] // SOURCE= CLIMutableAttribute01.fs # CLIMutableAttribute01.fs @@ -756,8 +757,8 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = (Error 934, Line 33, Col 10, Line 33, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 36, Col 10, Line 36, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 39, Col 10, Line 39, Col 13, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") - (Error 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") (Error 935, Line 54, Col 10, Line 54, Col 11, "Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal") ] @@ -775,8 +776,8 @@ type InterruptibleLazy<'T> private (valueFactory: unit -> 'T) = (Error 934, Line 33, Col 10, Line 33, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 36, Col 10, Line 36, Col 11, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") (Error 934, Line 39, Col 10, Line 39, Col 13, "Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute") - (Error 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") - (Error 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 41, Col 7, Line 41, Col 23, "This attribute is not valid for use on this language element") + (Warning 842, Line 44, Col 7, Line 44, Col 23, "This attribute is not valid for use on this language element") (Error 935, Line 54, Col 10, Line 54, Col 11, "Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs index 1e3c99dc8a5..44ee388af9d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs @@ -61,7 +61,7 @@ module CustomAttributes_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 15, Col 7, Line 15, Col 17, "This attribute is not valid for use on this language element") + (Warning 842, Line 15, Col 7, Line 15, Col 17, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeApplication04.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication04.fs @@ -71,7 +71,7 @@ module CustomAttributes_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 14, Col 3, Line 14, Col 13, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 3, Line 14, Col 13, "This attribute is not valid for use on this language element") ] // SOURCE=E_AttributeApplication05.fs SCFLAGS="--test:ErrorRanges" # E_AttributeApplication05.fs @@ -81,7 +81,8 @@ module CustomAttributes_Basic = |> verifyCompile |> shouldFail |> withDiagnostics [ - (Error 842, Line 8, Col 7, Line 8, Col 8, "This attribute is not valid for use on this language element") + (Warning 842, Line 8, Col 7, Line 8, Col 8, "This attribute is not valid for use on this language element") + (Error 824, Line 8, Col 7, Line 8, Col 8, "Attributes are not permitted on 'let' bindings in expressions") (Warning 20, Line 8, Col 1, Line 8, Col 31, "The result of this expression has type 'int' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") ] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs index ce51bcf6c14..38b84fb6498 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/EntryPoint/EntryPoint.fs @@ -75,7 +75,7 @@ module EntryPoint = |> compile |> shouldFail |> withDiagnostics [ - (Error 842, Line 9, Col 3, Line 9, Col 13, """This attribute is not valid for use on this language element""") + (Warning 842, Line 9, Col 3, Line 9, Col 13, """This attribute is not valid for use on this language element""") ] // SOURCE=E_twoattributesonsamefunction001.fs SCFLAGS="--test:ErrorRanges" # E_twoattributesonsamefunction001.fs diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs index c0a19c9ad3e..b59d28cbdd2 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/LetBindings/Basic/Basic.fs @@ -53,9 +53,9 @@ module LetBindings_Basic = |> shouldFail |> withDiagnostics [ (Error 683, Line 14, Col 6, Line 14, Col 27, "Attributes are not allowed within patterns") - (Error 842, Line 14, Col 8, Line 14, Col 25, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 8, Line 14, Col 25, "This attribute is not valid for use on this language element") (Error 683, Line 14, Col 42, Line 14, Col 63, "Attributes are not allowed within patterns") - (Error 842, Line 14, Col 44, Line 14, Col 61, "This attribute is not valid for use on this language element") + (Warning 842, Line 14, Col 44, Line 14, Col 61, "This attribute is not valid for use on this language element") ] // SOURCE=E_ErrorsForInlineValue.fs SCFLAGS="--test:ErrorRanges" # E_ErrorsForInlineValue.fs diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs index 1b68505ab1e..81ce04fc05a 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TailCallAttribute.fs @@ -245,7 +245,7 @@ namespace N [] let ``Warn successfully for invalid tailcalls in type methods`` () = - """ + FSharp """ namespace N module M = @@ -261,29 +261,12 @@ namespace N printfn "M2 called" this.M1() + 2 // should warn """ - |> FSharp |> withLangVersion80 |> compile |> shouldFail - |> withResults [ - { Error = Warning 3569 - Range = { StartLine = 10 - StartColumn = 17 - EndLine = 10 - EndColumn = 26 } - Message = - "The member or function 'M2' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } - { Error = Warning 3569 - Range = { StartLine = 15 - StartColumn = 17 - EndLine = 15 - EndColumn = 26 } - Message = -#if Debug - "The member or function 'M2' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } -#else - "The member or function 'M1' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way." } -#endif + |> withDiagnostics [ + (Warning 3569, Line 10, Col 17, Line 10, Col 26, "The member or function 'M2' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way."); + (Warning 3569, Line 15, Col 17, Line 15, Col 26, "The member or function 'M1' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way.") ] [] @@ -1481,7 +1464,10 @@ namespace N |> withLangVersionPreview |> compile |> shouldFail - |> withSingleDiagnostic (Error 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") + |> withDiagnostics [ + (Warning 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") + (Warning 3861, Line 7, Col 13, Line 7, Col 18, "The TailCall attribute should only be applied to recursive functions.") + ] [] let ``Error about attribute on recursive let-bound value`` () = @@ -1497,7 +1483,7 @@ namespace N |> withLangVersionPreview |> compile |> shouldFail - |> withSingleDiagnostic (Error 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") + |> withSingleDiagnostic (Warning 842, Line 6, Col 11, Line 6, Col 19, "This attribute is not valid for use on this language element") [] let ``Warn about self-defined attribute`` () = // is the analysis available for users of older FSharp.Core versions From 55507e9e7e98e640678932f96a25cb3bacc82904 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 23 Apr 2025 15:39:04 +0100 Subject: [PATCH 02/32] release notes --- docs/release-notes/.FSharp.Compiler.Service/9.0.300.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md index 16f5721e22a..05e15a667dd 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -48,6 +48,7 @@ * Warning for "useless null handling" works with piped syntax constructs now ([PR #18331](https://github.com/dotnet/fsharp/pull/18331)) * Make indent in generated overridden member code depend on the context, not fix to 4. ([PR #18341](https://github.com/dotnet/fsharp/pull/18341)) * Adjust caller info attribute error message range ([PR #18388](https://github.com/dotnet/fsharp/pull/18388)) +* Make attribute targets mismatch a warning and not an error ([PR #18492](https://github.com/dotnet/fsharp/pull/18492)) ### Breaking Changes * Struct unions with overlapping fields now generate mappings needed for reading via reflection ([Issue #18121](https://github.com/dotnet/fsharp/issues/17797), [PR #18274](https://github.com/dotnet/fsharp/pull/17877)) From 17380183feebe6a1cf30a8f678965b6cd689de82 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 23 Apr 2025 16:19:59 +0100 Subject: [PATCH 03/32] update tests --- .../PatternMatchCompilationTests.fs | 1 + .../Language/StructActivePatternTests.fs | 2 +- tests/fsharp/typecheck/sigs/neg16.bsl | 4 +- tests/fsharp/typecheck/sigs/neg20.bsl | 46 +++++++++---------- tests/fsharp/typecheck/sigs/neg32.bsl | 2 +- .../fsharp/typecheck/sigs/version50/neg20.bsl | 46 +++++++++---------- .../UnitsOfMeasure/WithOOP/E_GenericUOM01.fs | 2 +- 7 files changed, 52 insertions(+), 51 deletions(-) diff --git a/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs b/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs index 1b6d54d3577..cf870698077 100644 --- a/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/PatternMatchCompilationTests.fs @@ -41,6 +41,7 @@ match () with dumpDiagnostics checkResults |> shouldEqual [ "(3,2--3,25): Attributes are not allowed within patterns" "(3,4--3,23): This attribute is not valid for use on this language element" + "(3,17--3,22): This is not a valid constant expression or custom attribute value" ] diff --git a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs index aac654f549c..4c2451142fa 100644 --- a/tests/fsharp/Compiler/Language/StructActivePatternTests.fs +++ b/tests/fsharp/Compiler/Language/StructActivePatternTests.fs @@ -176,7 +176,7 @@ let (|Foo|_|) x = ValueNone [] let (|Foo|_|) x = ValueNone """ - [|(FSharpDiagnosticSeverity.Error, 842, (2, 3, 2, 9), + [|(FSharpDiagnosticSeverity.Warning, 842, (2, 3, 2, 9), "This attribute is not valid for use on this language element"); (FSharpDiagnosticSeverity.Error, 3350, (3, 6, 3, 13), "Feature 'Boolean-returning and return-type-directed partial active patterns' is not available in F# 8.0. Please use language version 9.0 or greater.")|] diff --git a/tests/fsharp/typecheck/sigs/neg16.bsl b/tests/fsharp/typecheck/sigs/neg16.bsl index 4c2300470f7..448ca9127be 100644 --- a/tests/fsharp/typecheck/sigs/neg16.bsl +++ b/tests/fsharp/typecheck/sigs/neg16.bsl @@ -13,9 +13,9 @@ neg16.fs(44,10,44,11): typecheck error FS0934: Records, union, abbreviations and neg16.fs(47,10,47,13): typecheck error FS0934: Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute -neg16.fs(49,7,49,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg16.fs(49,7,49,23): typecheck warning FS0842: This attribute is not valid for use on this language element -neg16.fs(52,7,52,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg16.fs(52,7,52,23): typecheck warning FS0842: This attribute is not valid for use on this language element neg16.fs(59,8,59,17): typecheck error FS0001: This expression was expected to have type 'Choice<'a,'b>' diff --git a/tests/fsharp/typecheck/sigs/neg20.bsl b/tests/fsharp/typecheck/sigs/neg20.bsl index 5229dcaacf6..28fa11b53f7 100644 --- a/tests/fsharp/typecheck/sigs/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/neg20.bsl @@ -213,53 +213,53 @@ neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to but here has type 'objnull' -neg20.fs(195,5,195,10): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(195,5,195,10): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(198,5,198,11): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(198,5,198,11): typecheck warning FS0842: This attribute is not valid for use on this language element neg20.fs(202,7,202,9): typecheck error FS0825: The 'DefaultValue' attribute may only be used on 'val' declarations -neg20.fs(204,5,204,14): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(204,5,204,14): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(207,5,207,11): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(207,5,207,11): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(210,5,210,12): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(210,5,210,12): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(213,5,213,33): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(213,5,213,33): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(216,5,216,12): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(216,5,216,12): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(219,5,219,15): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(219,5,219,15): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(222,5,222,31): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(222,5,222,31): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(225,5,225,22): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(225,5,225,22): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(228,5,228,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(228,5,228,23): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(231,5,231,21): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(231,5,231,21): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(234,5,234,34): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(234,5,234,34): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(237,5,237,34): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(237,5,237,34): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(240,5,240,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(240,5,240,23): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(243,5,243,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(243,5,243,23): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(249,9,249,27): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(249,9,249,27): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(255,5,255,28): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(255,5,255,28): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(258,5,258,38): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(258,5,258,38): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(261,5,261,17): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(261,5,261,17): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(265,5,265,24): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(265,5,265,24): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(268,5,268,27): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(268,5,268,27): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(271,5,271,15): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(271,5,271,15): typecheck warning FS0842: This attribute is not valid for use on this language element neg20.fs(278,14,278,95): typecheck error FS0507: No accessible member or object constructor named 'ProcessStartInfo' takes 0 arguments. Note the call to this member also provides 2 named arguments. diff --git a/tests/fsharp/typecheck/sigs/neg32.bsl b/tests/fsharp/typecheck/sigs/neg32.bsl index 87fbc723312..376138c1858 100644 --- a/tests/fsharp/typecheck/sigs/neg32.bsl +++ b/tests/fsharp/typecheck/sigs/neg32.bsl @@ -1,5 +1,5 @@ -neg32.fs(17,11,17,56): typecheck error FS0842: This attribute is not valid for use on this language element +neg32.fs(17,11,17,56): typecheck warning FS0842: This attribute is not valid for use on this language element neg32.fs(24,15,24,16): typecheck error FS0043: The member or object constructor 'TryParse' does not take 1 argument(s). An overload was found taking 2 arguments. diff --git a/tests/fsharp/typecheck/sigs/version50/neg20.bsl b/tests/fsharp/typecheck/sigs/version50/neg20.bsl index 394f7777b2a..f85f1d5d14f 100644 --- a/tests/fsharp/typecheck/sigs/version50/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/version50/neg20.bsl @@ -261,53 +261,53 @@ neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to but here has type 'objnull' -neg20.fs(195,5,195,10): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(195,5,195,10): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(198,5,198,11): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(198,5,198,11): typecheck warning FS0842: This attribute is not valid for use on this language element neg20.fs(202,7,202,9): typecheck error FS0825: The 'DefaultValue' attribute may only be used on 'val' declarations -neg20.fs(204,5,204,14): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(204,5,204,14): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(207,5,207,11): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(207,5,207,11): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(210,5,210,12): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(210,5,210,12): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(213,5,213,33): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(213,5,213,33): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(216,5,216,12): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(216,5,216,12): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(219,5,219,15): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(219,5,219,15): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(222,5,222,31): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(222,5,222,31): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(225,5,225,22): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(225,5,225,22): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(228,5,228,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(228,5,228,23): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(231,5,231,21): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(231,5,231,21): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(234,5,234,34): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(234,5,234,34): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(237,5,237,34): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(237,5,237,34): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(240,5,240,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(240,5,240,23): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(243,5,243,23): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(243,5,243,23): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(249,9,249,27): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(249,9,249,27): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(255,5,255,28): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(255,5,255,28): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(258,5,258,38): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(258,5,258,38): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(261,5,261,17): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(261,5,261,17): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(265,5,265,24): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(265,5,265,24): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(268,5,268,27): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(268,5,268,27): typecheck warning FS0842: This attribute is not valid for use on this language element -neg20.fs(271,5,271,15): typecheck error FS0842: This attribute is not valid for use on this language element +neg20.fs(271,5,271,15): typecheck warning FS0842: This attribute is not valid for use on this language element neg20.fs(278,14,278,95): typecheck error FS0507: No accessible member or object constructor named 'ProcessStartInfo' takes 0 arguments. Note the call to this member also provides 2 named arguments. diff --git a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs index 369697935e3..0f27193b5a7 100644 --- a/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs +++ b/tests/fsharpqa/Source/Conformance/UnitsOfMeasure/WithOOP/E_GenericUOM01.fs @@ -1,7 +1,7 @@ // #Regression #Conformance #UnitsOfMeasure #ObjectOrientedTypes // Verify error when putting invalid attributes on type arguments // (We should only allow [].) -//This attribute is not valid for use on this language element +//This attribute is not valid for use on this language element open System From 6f2b7064781a2c33c254f17ffac1a31a8cd3f41e Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Tue, 29 Apr 2025 09:43:56 +0100 Subject: [PATCH 04/32] update baselines --- tests/fsharp/typecheck/sigs/neg16.bsl | 4 +- tests/fsharp/typecheck/sigs/neg20.bsl | 48 ++++++++++--------- tests/fsharp/typecheck/sigs/neg32.bsl | 4 +- .../fsharp/typecheck/sigs/version50/neg20.bsl | 48 ++++++++++--------- 4 files changed, 54 insertions(+), 50 deletions(-) diff --git a/tests/fsharp/typecheck/sigs/neg16.bsl b/tests/fsharp/typecheck/sigs/neg16.bsl index 448ca9127be..4c2300470f7 100644 --- a/tests/fsharp/typecheck/sigs/neg16.bsl +++ b/tests/fsharp/typecheck/sigs/neg16.bsl @@ -13,9 +13,9 @@ neg16.fs(44,10,44,11): typecheck error FS0934: Records, union, abbreviations and neg16.fs(47,10,47,13): typecheck error FS0934: Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute -neg16.fs(49,7,49,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg16.fs(49,7,49,23): typecheck error FS0842: This attribute is not valid for use on this language element -neg16.fs(52,7,52,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg16.fs(52,7,52,23): typecheck error FS0842: This attribute is not valid for use on this language element neg16.fs(59,8,59,17): typecheck error FS0001: This expression was expected to have type 'Choice<'a,'b>' diff --git a/tests/fsharp/typecheck/sigs/neg20.bsl b/tests/fsharp/typecheck/sigs/neg20.bsl index 28fa11b53f7..2ff8515a78a 100644 --- a/tests/fsharp/typecheck/sigs/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/neg20.bsl @@ -213,53 +213,53 @@ neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to but here has type 'objnull' -neg20.fs(195,5,195,10): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(195,5,195,10): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(198,5,198,11): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(198,5,198,11): typecheck error FS0842: This attribute is not valid for use on this language element neg20.fs(202,7,202,9): typecheck error FS0825: The 'DefaultValue' attribute may only be used on 'val' declarations -neg20.fs(204,5,204,14): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(204,5,204,14): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(207,5,207,11): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(207,5,207,11): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(210,5,210,12): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(210,5,210,12): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(213,5,213,33): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(213,5,213,33): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(216,5,216,12): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(216,5,216,12): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(219,5,219,15): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(219,5,219,15): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(222,5,222,31): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(222,5,222,31): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(225,5,225,22): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(225,5,225,22): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(228,5,228,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(228,5,228,23): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(231,5,231,21): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(231,5,231,21): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(234,5,234,34): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(234,5,234,34): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(237,5,237,34): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(237,5,237,34): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(240,5,240,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(240,5,240,23): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(243,5,243,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(243,5,243,23): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(249,9,249,27): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(249,9,249,27): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(255,5,255,28): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(255,5,255,28): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(258,5,258,38): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(258,5,258,38): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(261,5,261,17): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(261,5,261,17): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(265,5,265,24): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(265,5,265,24): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(268,5,268,27): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(268,5,268,27): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(271,5,271,15): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(271,5,271,15): typecheck error FS0842: This attribute is not valid for use on this language element neg20.fs(278,14,278,95): typecheck error FS0507: No accessible member or object constructor named 'ProcessStartInfo' takes 0 arguments. Note the call to this member also provides 2 named arguments. @@ -294,6 +294,7 @@ neg20.fs(335,11,335,24): typecheck error FS0041: A unique overload for method 'S Known type of argument: 'a0 Candidates: + - System.String(value: System.ReadOnlySpan) : System.String - System.String(value: char array) : System.String - System.String(value: nativeptr) : System.String - System.String(value: nativeptr) : System.String @@ -303,6 +304,7 @@ neg20.fs(336,11,336,22): typecheck error FS0041: A unique overload for method 'G Known type of argument: 'a0 Candidates: + - System.Guid(b: System.ReadOnlySpan) : System.Guid - System.Guid(b: byte array) : System.Guid - System.Guid(g: string) : System.Guid diff --git a/tests/fsharp/typecheck/sigs/neg32.bsl b/tests/fsharp/typecheck/sigs/neg32.bsl index 376138c1858..7649c0719b5 100644 --- a/tests/fsharp/typecheck/sigs/neg32.bsl +++ b/tests/fsharp/typecheck/sigs/neg32.bsl @@ -1,7 +1,7 @@ -neg32.fs(17,11,17,56): typecheck warning FS0842: This attribute is not valid for use on this language element +neg32.fs(17,11,17,56): typecheck error FS0842: This attribute is not valid for use on this language element -neg32.fs(24,15,24,16): typecheck error FS0043: The member or object constructor 'TryParse' does not take 1 argument(s). An overload was found taking 2 arguments. +neg32.fs(24,15,24,16): typecheck error FS0043: The member or object constructor 'TryParse' does not take 1 argument(s). An overload was found taking 4 arguments. neg32.fs(43,17,43,19): typecheck error FS0039: The type parameter 'T is not defined. diff --git a/tests/fsharp/typecheck/sigs/version50/neg20.bsl b/tests/fsharp/typecheck/sigs/version50/neg20.bsl index f85f1d5d14f..d5de8268fab 100644 --- a/tests/fsharp/typecheck/sigs/version50/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/version50/neg20.bsl @@ -261,53 +261,53 @@ neg20.fs(190,34,190,39): typecheck error FS0001: This expression was expected to but here has type 'objnull' -neg20.fs(195,5,195,10): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(195,5,195,10): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(198,5,198,11): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(198,5,198,11): typecheck error FS0842: This attribute is not valid for use on this language element neg20.fs(202,7,202,9): typecheck error FS0825: The 'DefaultValue' attribute may only be used on 'val' declarations -neg20.fs(204,5,204,14): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(204,5,204,14): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(207,5,207,11): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(207,5,207,11): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(210,5,210,12): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(210,5,210,12): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(213,5,213,33): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(213,5,213,33): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(216,5,216,12): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(216,5,216,12): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(219,5,219,15): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(219,5,219,15): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(222,5,222,31): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(222,5,222,31): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(225,5,225,22): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(225,5,225,22): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(228,5,228,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(228,5,228,23): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(231,5,231,21): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(231,5,231,21): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(234,5,234,34): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(234,5,234,34): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(237,5,237,34): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(237,5,237,34): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(240,5,240,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(240,5,240,23): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(243,5,243,23): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(243,5,243,23): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(249,9,249,27): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(249,9,249,27): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(255,5,255,28): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(255,5,255,28): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(258,5,258,38): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(258,5,258,38): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(261,5,261,17): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(261,5,261,17): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(265,5,265,24): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(265,5,265,24): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(268,5,268,27): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(268,5,268,27): typecheck error FS0842: This attribute is not valid for use on this language element -neg20.fs(271,5,271,15): typecheck warning FS0842: This attribute is not valid for use on this language element +neg20.fs(271,5,271,15): typecheck error FS0842: This attribute is not valid for use on this language element neg20.fs(278,14,278,95): typecheck error FS0507: No accessible member or object constructor named 'ProcessStartInfo' takes 0 arguments. Note the call to this member also provides 2 named arguments. @@ -342,6 +342,7 @@ neg20.fs(335,11,335,24): typecheck error FS0041: A unique overload for method 'S Known type of argument: 'a0 Candidates: + - System.String(value: System.ReadOnlySpan) : System.String - System.String(value: char array) : System.String - System.String(value: nativeptr) : System.String - System.String(value: nativeptr) : System.String @@ -351,6 +352,7 @@ neg20.fs(336,11,336,22): typecheck error FS0041: A unique overload for method 'G Known type of argument: 'a0 Candidates: + - System.Guid(b: System.ReadOnlySpan) : System.Guid - System.Guid(b: byte array) : System.Guid - System.Guid(g: string) : System.Guid From 75d8f5ef637741991df6c15ae75d202b8412dd65 Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Tue, 29 Apr 2025 19:33:38 +0100 Subject: [PATCH 05/32] Update baselines --- tests/fsharp/typecheck/sigs/neg20.bsl | 2 -- tests/fsharp/typecheck/sigs/neg32.bsl | 2 +- tests/fsharp/typecheck/sigs/version50/neg20.bsl | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/fsharp/typecheck/sigs/neg20.bsl b/tests/fsharp/typecheck/sigs/neg20.bsl index 2ff8515a78a..5229dcaacf6 100644 --- a/tests/fsharp/typecheck/sigs/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/neg20.bsl @@ -294,7 +294,6 @@ neg20.fs(335,11,335,24): typecheck error FS0041: A unique overload for method 'S Known type of argument: 'a0 Candidates: - - System.String(value: System.ReadOnlySpan) : System.String - System.String(value: char array) : System.String - System.String(value: nativeptr) : System.String - System.String(value: nativeptr) : System.String @@ -304,7 +303,6 @@ neg20.fs(336,11,336,22): typecheck error FS0041: A unique overload for method 'G Known type of argument: 'a0 Candidates: - - System.Guid(b: System.ReadOnlySpan) : System.Guid - System.Guid(b: byte array) : System.Guid - System.Guid(g: string) : System.Guid diff --git a/tests/fsharp/typecheck/sigs/neg32.bsl b/tests/fsharp/typecheck/sigs/neg32.bsl index 7649c0719b5..87fbc723312 100644 --- a/tests/fsharp/typecheck/sigs/neg32.bsl +++ b/tests/fsharp/typecheck/sigs/neg32.bsl @@ -1,7 +1,7 @@ neg32.fs(17,11,17,56): typecheck error FS0842: This attribute is not valid for use on this language element -neg32.fs(24,15,24,16): typecheck error FS0043: The member or object constructor 'TryParse' does not take 1 argument(s). An overload was found taking 4 arguments. +neg32.fs(24,15,24,16): typecheck error FS0043: The member or object constructor 'TryParse' does not take 1 argument(s). An overload was found taking 2 arguments. neg32.fs(43,17,43,19): typecheck error FS0039: The type parameter 'T is not defined. diff --git a/tests/fsharp/typecheck/sigs/version50/neg20.bsl b/tests/fsharp/typecheck/sigs/version50/neg20.bsl index d5de8268fab..394f7777b2a 100644 --- a/tests/fsharp/typecheck/sigs/version50/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/version50/neg20.bsl @@ -342,7 +342,6 @@ neg20.fs(335,11,335,24): typecheck error FS0041: A unique overload for method 'S Known type of argument: 'a0 Candidates: - - System.String(value: System.ReadOnlySpan) : System.String - System.String(value: char array) : System.String - System.String(value: nativeptr) : System.String - System.String(value: nativeptr) : System.String @@ -352,7 +351,6 @@ neg20.fs(336,11,336,22): typecheck error FS0041: A unique overload for method 'G Known type of argument: 'a0 Candidates: - - System.Guid(b: System.ReadOnlySpan) : System.Guid - System.Guid(b: byte array) : System.Guid - System.Guid(g: string) : System.Guid From 4248f2a9225b2533cb4137d1e1b4311ce9e3cad1 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 30 Apr 2025 21:58:10 +0100 Subject: [PATCH 06/32] Move attribute form logic to an AP --- .../Checking/Expressions/CheckExpressions.fs | 55 +++++++++++-------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index e2d21975311..567e1da0310 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -3187,6 +3187,24 @@ let BuildRecdFieldSet g m objExpr (rfinfo: RecdFieldInfo) argExpr = let wrap, objExpr, _readonly, _writeonly = mkExprAddrOfExpr g boxity false DefinitelyMutates objExpr None m wrap (mkRecdFieldSetViaExprAddr (objExpr, rfinfo.RecdFieldRef, rfinfo.TypeInst, argExpr, m) ) +// This is used to check the target of an attribute with the form of +// Long Form: [] +// Short Form: [] +let (|LongFormAttrTarget|UnrecognizedLongAttrTarget|ShortFormAttributeTarget|) (targetIndicator: Ident option) = + match targetIndicator with + | Some id when id.idText = "assembly" -> LongFormAttrTarget AttributeTargets.Assembly + | Some id when id.idText = "module" -> LongFormAttrTarget AttributeTargets.Module + | Some id when id.idText = "return" -> LongFormAttrTarget AttributeTargets.ReturnValue + | Some id when id.idText = "field" -> LongFormAttrTarget AttributeTargets.Field + | Some id when id.idText = "property" -> LongFormAttrTarget AttributeTargets.Property + | Some id when id.idText = "method" -> LongFormAttrTarget AttributeTargets.Method + | Some id when id.idText = "param" -> LongFormAttrTarget AttributeTargets.Parameter + | Some id when id.idText = "type" -> LongFormAttrTarget AttributeTargets.TyconDecl + | Some id when id.idText = "constructor" -> LongFormAttrTarget AttributeTargets.Constructor + | Some id when id.idText = "event" -> LongFormAttrTarget AttributeTargets.Event + | Some id -> UnrecognizedLongAttrTarget id + | None -> ShortFormAttributeTarget + //------------------------------------------------------------------------- // Helpers dealing with named and optional args at callsites //------------------------------------------------------------------------- @@ -11344,27 +11362,18 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn (validOnDefault, inheritedDefault) | _ -> (validOnDefault, inheritedDefault) - let possibleTgts = enum validOn &&& attrTgt - let directedTgts = + let attributeTargets = enum validOn &&& attrTgt + let directedTargets = match targetIndicator with - | Some id when id.idText = "assembly" -> AttributeTargets.Assembly - | Some id when id.idText = "module" -> AttributeTargets.Module - | Some id when id.idText = "return" -> AttributeTargets.ReturnValue - | Some id when id.idText = "field" -> AttributeTargets.Field - | Some id when id.idText = "property" -> AttributeTargets.Property - | Some id when id.idText = "method" -> AttributeTargets.Method - | Some id when id.idText = "param" -> AttributeTargets.Parameter - | Some id when id.idText = "type" -> AttributeTargets.TyconDecl - | Some id when id.idText = "constructor" -> AttributeTargets.Constructor - | Some id when id.idText = "event" -> AttributeTargets.Event - | Some id -> - errorR(Error(FSComp.SR.tcUnrecognizedAttributeTarget(), id.idRange)) - possibleTgts - // mask explicit targets - | _ -> possibleTgts &&& ~~~ attrEx - let constrainedTgts = possibleTgts &&& directedTgts - if constrainedTgts = enum 0 then - if (directedTgts = AttributeTargets.Assembly || directedTgts = AttributeTargets.Module) then + | LongFormAttrTarget attrTarget -> attrTarget + | UnrecognizedLongAttrTarget attrTarget -> + errorR(Error(FSComp.SR.tcUnrecognizedAttributeTarget(), attrTarget.idRange)) + attributeTargets + | ShortFormAttributeTarget -> attributeTargets &&& ~~~ attrEx + + let constrainedTargets = attributeTargets &&& directedTargets + if constrainedTargets = enum 0 then + if (directedTargets = AttributeTargets.Assembly || directedTargets = AttributeTargets.Module) then error(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElementUseDo(), mAttr)) else warning(Error(FSComp.SR.tcAttributeIsNotValidForLanguageElement(), mAttr)) @@ -11428,11 +11437,11 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn if isStruct then error (Error(FSComp.SR.tcCustomAttributeMustBeReferenceType(), m)) if args.Length <> ilMethRef.ArgTypes.Length then error (Error(FSComp.SR.tcCustomAttributeArgumentMismatch(), m)) let args = args |> List.map mkAttribExpr - Attrib(tcref, ILAttrib ilMethRef, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTgts, m) + Attrib(tcref, ILAttrib ilMethRef, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTargets, m) | Expr.App (InnerExprPat(ExprValWithPossibleTypeInst(vref, _, _, _)), _, _, args, _) -> let args = args |> List.collect (function Expr.Const (Const.Unit, _, _) -> [] | expr -> tryDestRefTupleExpr expr) |> List.map mkAttribExpr - Attrib(tcref, FSAttrib vref, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTgts, mAttr) + Attrib(tcref, FSAttrib vref, args, namedAttribArgMap, isAppliedToGetterOrSetter, Some constrainedTargets, mAttr) | _ -> error (Error(FSComp.SR.tcCustomAttributeMustInvokeConstructor(), mAttr)) @@ -11440,7 +11449,7 @@ and TcAttributeEx canFail (cenv: cenv) (env: TcEnv) attrTgt attrEx (synAttr: Syn | _ -> error(Error(FSComp.SR.tcAttributeExpressionsMustBeConstructorCalls(), mAttr)) - [ (constrainedTgts, attrib) ], false + [ (constrainedTargets, attrib) ], false and TcAttributesWithPossibleTargetsEx canFail (cenv: cenv) env attrTgt attrEx synAttribs = From b7a0a41730652fc706bffe838fd7b688544d6985 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Mon, 18 Aug 2025 11:30:02 +0100 Subject: [PATCH 07/32] Parser: capture named field separators --- src/Compiler/Checking/CheckPatterns.fs | 6 ++- .../GraphChecking/FileContentMapping.fs | 4 +- src/Compiler/Service/ServiceParseTreeWalk.fs | 2 +- src/Compiler/Service/ServiceParsedInputOps.fs | 16 ++++---- src/Compiler/Service/ServiceXmlDocParser.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTree.fs | 25 +++++++++++- src/Compiler/SyntaxTree/SyntaxTree.fsi | 26 ++++++++++++- src/Compiler/pars.fsy | 38 +++++++++++-------- .../SyntaxTree/Pattern/Named field 01.fs.bsl | 20 ++++++---- .../SyntaxTree/Pattern/Named field 02.fs.bsl | 13 ++++--- .../SyntaxTree/Pattern/Named field 03.fs.bsl | 13 ++++--- .../SyntaxTree/Pattern/Named field 04.fs.bsl | 16 ++++---- .../SyntaxTree/Pattern/Named field 05.fs.bsl | 20 ++++++---- .../data/SyntaxTree/Pattern/Named field 06.fs | 4 ++ .../SyntaxTree/Pattern/Named field 06.fs.bsl | 37 ++++++++++++++++++ ...ParenthesesOfSynArgPatsNamePatPairs.fs.bsl | 12 +++--- ...airsContainsTheRangeOfTheEqualsSign.fs.bsl | 11 +++--- 17 files changed, 190 insertions(+), 75 deletions(-) create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 06.fs create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl diff --git a/src/Compiler/Checking/CheckPatterns.fs b/src/Compiler/Checking/CheckPatterns.fs index 9665bfd2463..f40adff07fd 100644 --- a/src/Compiler/Checking/CheckPatterns.fs +++ b/src/Compiler/Checking/CheckPatterns.fs @@ -503,7 +503,9 @@ and CheckNoArgsForLiteral args m = and GetSynArgPatterns args = match args with | SynArgPats.Pats args -> args - | SynArgPats.NamePatPairs (pats = pairs) -> List.map (fun (_, _, pat) -> pat) pairs + | SynArgPats.NamePatPairs (pats = pairs) -> + pairs + |> List.map _.Pattern and TcArgPats warnOnUpper (cenv: cenv) env vFlags patEnv args = let g = cenv.g @@ -657,7 +659,7 @@ and TcPatLongIdentUnionCaseOrExnCase warnOnUpper cenv env ad vFlags patEnv ty (m let result = Array.zeroCreate numArgTys let extraPatterns = List () - for id, _, pat in pairs do + for NamePatPairField(fieldName = id; pat = pat) in pairs do match argNames |> List.tryFindIndex (fun id2 -> id.idText = id2.Id.idText) with | None -> extraPatterns.Add pat diff --git a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs index 97fd2e3d987..85026fcbb5d 100644 --- a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs +++ b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs @@ -650,8 +650,8 @@ let visitSynArgPats (argPat: SynArgPats) = | SynArgPats.Pats args -> List.collect visitPat args | SynArgPats.NamePatPairs(pats = pats) -> [ - for _, _, p in pats do - yield! visitPat p + for p in pats do + yield! visitPat p.Pattern ] let visitSynSimplePat (pat: SynSimplePat) = diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index da7f1aaadc2..eaeef359e7a 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -780,7 +780,7 @@ module SyntaxTraversal = | SynPat.LongIdent(argPats = args) -> match args with | SynArgPats.Pats ps -> ps |> List.tryPick (traversePat path) - | SynArgPats.NamePatPairs(pats = ps) -> ps |> List.map (fun (_, _, pat) -> pat) |> List.tryPick (traversePat path) + | SynArgPats.NamePatPairs(pats = ps) -> ps |> List.map _.Pattern |> List.tryPick (traversePat path) | SynPat.Typed(p, ty, _) -> match traversePat path p with | None -> traverseSynType path ty diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 4b5e3cf9028..ebb59d870bc 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -613,7 +613,7 @@ module ParsedInput = let (|ConstructorPats|) pats = match pats with | SynArgPats.Pats ps -> ps - | SynArgPats.NamePatPairs(pats = xs) -> List.map (fun (_, _, pat) -> pat) xs + | SynArgPats.NamePatPairs(pats = xs) -> xs |> List.map _.Pattern let inline isPosInRange range = rangeContainsPos range pos @@ -1293,18 +1293,20 @@ module ParsedInput = rangeContainsPos m pos -> pats - |> List.tryPick (fun (fieldId, _, pat) -> - if rangeContainsPos fieldId.idRange pos then - let referencedFields = pats |> List.map (fun (id, _, _) -> id.idText) + |> List.tryPick (fun field -> + if rangeContainsPos field.FieldName.idRange pos then + let referencedFields = pats |> List.map _.FieldName.idText Some(CompletionContext.Pattern(PatternContext.UnionCaseFieldIdentifier(referencedFields, caseId.Range))) else - let context = Some(PatternContext.NamedUnionCaseField(fieldId.idText, caseId.Range)) + let context = + Some(PatternContext.NamedUnionCaseField(field.FieldName.idText, caseId.Range)) + TryGetCompletionContextInPattern suppressIdentifierCompletions pat context pos) |> Option.orElseWith (fun () -> // Last resort - check for fun (Case (item1 = a; | )) -> // That is, pos is after the last pair and still within parentheses if rangeBeforePos mPairs pos then - let referencedFields = pats |> List.map (fun (id, _, _) -> id.idText) + let referencedFields = pats |> List.map _.FieldName.idText Some(CompletionContext.Pattern(PatternContext.UnionCaseFieldIdentifier(referencedFields, caseId.Range))) else None) @@ -1870,7 +1872,7 @@ module ParsedInput = let (|ConstructorPats|) pats = match pats with | SynArgPats.Pats ps -> ps - | SynArgPats.NamePatPairs(pats = xs) -> List.map (fun (_, _, pat) -> pat) xs + | SynArgPats.NamePatPairs(pats = xs) -> xs |> List.map _.Pattern /// Returns all `Ident`s and `LongIdent`s found in an untyped AST. let getLongIdents (parsedInput: ParsedInput) : IDictionary = diff --git a/src/Compiler/Service/ServiceXmlDocParser.fs b/src/Compiler/Service/ServiceXmlDocParser.fs index 1c1e7ef4184..e77ba1cbab9 100644 --- a/src/Compiler/Service/ServiceXmlDocParser.fs +++ b/src/Compiler/Service/ServiceXmlDocParser.fs @@ -16,7 +16,7 @@ module XmlDocParsing = let (|ConstructorPats|) = function | SynArgPats.Pats ps -> ps - | SynArgPats.NamePatPairs(pats = xs) -> List.map (fun (_, _, pat) -> pat) xs + | SynArgPats.NamePatPairs(pats = xs) -> xs |> List.map _.Pattern let rec digNamesFrom pat = match pat with diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index ca71014c79c..57c026177c1 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -920,16 +920,37 @@ type SynSimplePats = match x with | SynSimplePats.SimplePats(range = range) -> range +[] +type NamePatPairField = + | NamePatPairField of + fieldName: Ident * + equalsRange: range option * + range: range option * + pat: SynPat * + blockSeparator: BlockSeparator option + + member this.FieldName = + match this with + | NamePatPairField(fieldName = n) -> n + + member this.Range = + match this with + | NamePatPairField(range = m) -> m + + member this.Pattern = + match this with + | NamePatPairField(pat = pat) -> pat + [] type SynArgPats = | Pats of pats: SynPat list - | NamePatPairs of pats: (Ident * range option * SynPat) list * range: range * trivia: SynArgPatsNamePatPairsTrivia + | NamePatPairs of pats: NamePatPairField list * range: range * trivia: SynArgPatsNamePatPairsTrivia member x.Patterns = match x with | Pats pats -> pats - | NamePatPairs(pats = pats) -> pats |> List.map (fun (_, _, pat) -> pat) + | NamePatPairs(pats = pats) -> pats |> List.map _.Pattern [] type SynPat = diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 131c8f6f056..9ba76184175 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1046,12 +1046,36 @@ type SynSimplePats = member Range: range +/// Represents a single named argument pattern a pair of the form `name = pattern`. +[] +type NamePatPairField = + | NamePatPairField of + /// The identifier of the named field/parameter. + fieldName: Ident * + /// The range of the equals sign in `name = pattern`, if present. + equalsRange: range option * + /// The overall range of this name–pattern pair. + range: range option * + /// The pattern associated with the named field. + pat: SynPat * + /// The separator trivia that follows this pair (e.g., semicolon or block separator), if any. + blockSeparator: BlockSeparator option + + /// Gets the identifier of the named field/parameter. + member FieldName: Ident + + /// Gets the overall range of this name–pattern pair, if available. + member Range: range option + + /// Gets the pattern associated with the named field. + member Pattern: SynPat + /// Represents a syntax tree for arguments patterns [] type SynArgPats = | Pats of pats: SynPat list - | NamePatPairs of pats: (Ident * range option * SynPat) list * range: range * trivia: SynArgPatsNamePatPairsTrivia + | NamePatPairs of pats: NamePatPairField list * range: range * trivia: SynArgPatsNamePatPairsTrivia member Patterns: SynPat list diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index a8225213eb6..79743d8d7e5 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3655,15 +3655,21 @@ conjPatternElements: { $3 :: $1 :: [] } namePatPairs: - | namePatPair opt_seps - { [$1] } + | namePatPair opt_seps_block + { let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + [ NamePatPairField(id, mEq, Some m, pat, $2) ] } - | namePatPair seps namePatPairs - { $1 :: $3 } + | namePatPair seps_block namePatPairs + { let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + NamePatPairField(id, mEq, Some m, pat, Some $2) :: $3 } - | namePatPair seps seps namePatPairs + | namePatPair seps_block seps_block namePatPairs { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) - ($1 :: $4) } + let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + NamePatPairField(id, mEq, Some m, pat, Some $2) :: $4 } namePatPair: | ident EQUALS parenPattern @@ -5656,7 +5662,7 @@ optInlineAssemblyReturnTypes: { [] } recdExpr: - | INHERIT atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType recdExprBindings opt_seps_recd + | INHERIT atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType recdExprBindings opt_seps_block { let arg = match $4 with None -> mkSynUnit (lhs parseState) | Some e -> e let l = List.rev $5 let dummyField = mkRecdField (SynLongIdent([], [], [])) // dummy identifier, it will be discarded @@ -5670,7 +5676,7 @@ recdExpr: None, a, b } recdExprCore: - | appExpr EQUALS declExprBlock recdExprBindings opt_seps_recd + | appExpr EQUALS declExprBlock recdExprBindings opt_seps_block { match $1 with | LongOrSingleIdent(false, (SynLongIdent _ as f), None, m) -> let f = mkRecdField f @@ -5714,7 +5720,7 @@ recdExprCore: (None, [ SynExprRecordField(f, Some mEquals, None, (rhs2 parseState 1 2), None) ]) } - | UNDERSCORE EQUALS declExprBlock recdExprBindings opt_seps_recd + | UNDERSCORE EQUALS declExprBlock recdExprBindings opt_seps_block { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnderscoreInvalidFieldName()) let f = mkUnderscoreRecdField (rhs parseState 1) let mEquals = rhs parseState 2 @@ -5723,27 +5729,27 @@ recdExprCore: (None, l) } /* handles case like {x with} */ - | appExpr WITH recdBinding recdExprBindings opt_seps_recd + | appExpr WITH recdBinding recdExprBindings opt_seps_block { let l = List.rev $4 let l = rebindRanges $3 l $5 (Some($1, (rhs parseState 2, None)), l) } - | appExpr OWITH opt_seps_recd OEND + | appExpr OWITH opt_seps_block OEND { (Some($1, (rhs parseState 2, None)), []) } - | appExpr OWITH recdBinding recdExprBindings opt_seps_recd OEND + | appExpr OWITH recdBinding recdExprBindings opt_seps_block OEND { let l = List.rev $4 let l = rebindRanges $3 l $5 (Some($1, (rhs parseState 2, None)), l) } -opt_seps_recd: - | seps_recd +opt_seps_block: + | seps_block { Some $1 } | /* EMPTY */ { None } -seps_recd: +seps_block: | OBLOCKSEP { (rhs parseState 1), None } @@ -5769,7 +5775,7 @@ pathOrUnderscore : mkUnderscoreRecdField m } recdExprBindings: - | recdExprBindings seps_recd recdBinding + | recdExprBindings seps_block recdBinding { ($3, Some $2) :: $1 } | /* EMPTY */ diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl index caa7e025499..a274028de93 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl @@ -10,14 +10,18 @@ ImplFile (LongIdent (SynLongIdent ([A], [], [None]), None, None, NamePatPairs - ([(a, Some (4,6--4,7), Wild (4,8--4,9)); - (b, Some (4,13--4,14), Wild (4,15--4,16))], - (4,4--4,17), { ParenRange = (4,3--4,17) }), None, - (4,2--4,17)), None, Const (Int32 2, (4,21--4,22)), - (4,2--4,22), Yes, { ArrowRange = Some (4,18--4,20) - BarRange = Some (4,0--4,1) })], - (3,0--4,22), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,8--3,12) }), (3,0--4,22))], + ([NamePatPairField + (a, Some (4,6--4,7), Some (4,4--4,9), + Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + NamePatPairField + (b, Some (4,13--4,14), Some (4,11--4,16), + Wild (4,15--4,16), None)], (4,4--4,17), + { ParenRange = (4,3--4,17) }), None, (4,2--4,17)), + None, Const (Int32 2, (4,21--4,22)), (4,2--4,22), Yes, + { ArrowRange = Some (4,18--4,20) + BarRange = Some (4,0--4,1) })], (3,0--4,22), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,22))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl index a571440a741..de730000e22 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl @@ -10,11 +10,14 @@ ImplFile (LongIdent (SynLongIdent ([A], [], [None]), None, None, NamePatPairs - ([(a, Some (4,6--4,7), Wild (4,8--4,9)); - (b, Some (4,13--4,14), - FromParseError (Wild (4,14--4,14), (4,14--4,14)))], - (4,4--4,16), { ParenRange = (4,3--4,16) }), None, - (4,2--4,16)), None, Const (Int32 2, (4,20--4,21)), + ([NamePatPairField + (a, Some (4,6--4,7), Some (4,4--4,9), + Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + NamePatPairField + (b, Some (4,13--4,14), Some (4,11--4,14), + FromParseError (Wild (4,14--4,14), (4,14--4,14)), + None)], (4,4--4,16), { ParenRange = (4,3--4,16) }), + None, (4,2--4,16)), None, Const (Int32 2, (4,20--4,21)), (4,2--4,21), Yes, { ArrowRange = Some (4,17--4,19) BarRange = Some (4,0--4,1) })], (3,0--4,21), { MatchKeyword = (3,0--3,5) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 4902847118f..775dcee136b 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -10,11 +10,14 @@ ImplFile (LongIdent (SynLongIdent ([A], [], [None]), None, None, NamePatPairs - ([(a, Some (4,6--4,7), Wild (4,8--4,9)); - (b, None, - FromParseError (Wild (4,12--4,12), (4,12--4,12)))], - (4,4--4,13), { ParenRange = (4,3--4,13) }), None, - (4,2--4,13)), None, Const (Int32 2, (4,17--4,18)), + ([NamePatPairField + (a, Some (4,6--4,7), Some (4,4--4,9), + Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + NamePatPairField + (b, None, Some (4,11--4,12), + FromParseError (Wild (4,12--4,12), (4,12--4,12)), + None)], (4,4--4,13), { ParenRange = (4,3--4,13) }), + None, (4,2--4,13)), None, Const (Int32 2, (4,17--4,18)), (4,2--4,18), Yes, { ArrowRange = Some (4,14--4,16) BarRange = Some (4,0--4,1) })], (3,0--4,18), { MatchKeyword = (3,0--3,5) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl index 8289d0b9bef..b91deff8a1f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl @@ -10,13 +10,15 @@ ImplFile (LongIdent (SynLongIdent ([A], [], [None]), None, None, NamePatPairs - ([(a, Some (4,6--4,7), Wild (4,8--4,9))], (4,4--4,10), - { ParenRange = (4,3--4,11) }), None, (4,2--4,11)), - None, Const (Int32 2, (4,15--4,16)), (4,2--4,16), Yes, - { ArrowRange = Some (4,12--4,14) - BarRange = Some (4,0--4,1) })], (3,0--4,16), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,8--3,12) }), (3,0--4,16))], + ([NamePatPairField + (a, Some (4,6--4,7), Some (4,4--4,9), + Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10)))], + (4,4--4,10), { ParenRange = (4,3--4,11) }), None, + (4,2--4,11)), None, Const (Int32 2, (4,15--4,16)), + (4,2--4,16), Yes, { ArrowRange = Some (4,12--4,14) + BarRange = Some (4,0--4,1) })], + (3,0--4,16), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,16))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index 9e12bc1e850..266a0fdc377 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -10,14 +10,18 @@ ImplFile (LongIdent (SynLongIdent ([A], [], [None]), None, None, NamePatPairs - ([(a, Some (4,6--4,7), Wild (4,8--4,9)); - (c, Some (4,15--4,16), Wild (4,17--4,18))], - (4,4--4,19), { ParenRange = (4,3--4,19) }), None, - (4,2--4,19)), None, Const (Int32 2, (4,23--4,24)), - (4,2--4,24), Yes, { ArrowRange = Some (4,20--4,22) - BarRange = Some (4,0--4,1) })], - (3,0--4,24), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,8--3,12) }), (3,0--4,24))], + ([NamePatPairField + (a, Some (4,6--4,7), Some (4,4--4,9), + Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + NamePatPairField + (c, Some (4,15--4,16), Some (4,13--4,18), + Wild (4,17--4,18), None)], (4,4--4,19), + { ParenRange = (4,3--4,19) }), None, (4,2--4,19)), + None, Const (Int32 2, (4,23--4,24)), (4,2--4,24), Yes, + { ArrowRange = Some (4,20--4,22) + BarRange = Some (4,0--4,1) })], (3,0--4,24), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,24))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs new file mode 100644 index 00000000000..6360370124a --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs @@ -0,0 +1,4 @@ +module Module + +match 1 with +| A(a = a; b = b; c = c) -> 2 diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl new file mode 100644 index 00000000000..70e88ada32d --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl @@ -0,0 +1,37 @@ +ImplFile + (ParsedImplFileInput + ("/root/Pattern/Named field 06.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Match + (Yes (3,0--3,12), Const (Int32 1, (3,6--3,7)), + [SynMatchClause + (LongIdent + (SynLongIdent ([A], [], [None]), None, None, + NamePatPairs + ([NamePatPairField + (a, Some (4,6--4,7), Some (4,4--4,9), + Named + (SynIdent (a, None), false, None, (4,8--4,9)), + Some ((4,9--4,10), Some (4,10))); + NamePatPairField + (b, Some (4,13--4,14), Some (4,11--4,16), + Named + (SynIdent (b, None), false, None, (4,15--4,16)), + Some ((4,16--4,17), Some (4,17))); + NamePatPairField + (c, Some (4,20--4,21), Some (4,18--4,23), + Named + (SynIdent (c, None), false, None, (4,22--4,23)), + None)], (4,4--4,24), { ParenRange = (4,3--4,24) }), + None, (4,2--4,24)), None, Const (Int32 2, (4,28--4,29)), + (4,2--4,29), Yes, { ArrowRange = Some (4,25--4,27) + BarRange = Some (4,0--4,1) })], + (3,0--4,29), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,29))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,29), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl index 14fd4eb7b5b..f68e576ecec 100644 --- a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl @@ -11,11 +11,13 @@ ImplFile (LongIdent (SynLongIdent ([OnePartData], [], [None]), None, None, NamePatPairs - ([(part1, Some (4,10--4,11), - Named - (SynIdent (p1, None), false, None, (4,12--4,14)))], - (4,4--5,13), { ParenRange = (3,13--5,13) }), None, - (3,2--5,13)), None, Ident p1, (3,2--5,19), Yes, + ([NamePatPairField + (part1, Some (4,10--4,11), Some (4,4--4,14), + Named + (SynIdent (p1, None), false, None, (4,12--4,14)), + None)], (4,4--5,13), + { ParenRange = (3,13--5,13) }), None, (3,2--5,13)), + None, Ident p1, (3,2--5,19), Yes, { ArrowRange = Some (5,14--5,16) BarRange = Some (3,0--3,1) }); SynMatchClause diff --git a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl index 75f26b45484..affc56dc2e8 100644 --- a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl @@ -14,11 +14,12 @@ ImplFile (LongIdent (SynLongIdent ([X], [], [None]), None, None, NamePatPairs - ([(Y, Some (3,7--3,8), - Named - (SynIdent (y, None), false, None, (3,9--3,10)))], - (3,4--3,11), { ParenRange = (3,3--3,11) }), None, - (3,2--3,11)), None, Ident y, (3,2--3,16), Yes, + ([NamePatPairField + (Y, Some (3,7--3,8), Some (3,4--3,10), + Named + (SynIdent (y, None), false, None, (3,9--3,10)), + None)], (3,4--3,11), { ParenRange = (3,3--3,11) }), + None, (3,2--3,11)), None, Ident y, (3,2--3,16), Yes, { ArrowRange = Some (3,12--3,14) BarRange = Some (3,0--3,1) })], (2,0--3,16), { MatchKeyword = (2,0--2,5) From a2b1fcf88d6a4b4f911e5fb315f663520f10e470 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Mon, 18 Aug 2025 14:35:48 +0100 Subject: [PATCH 08/32] udpate bsl --- ...ervice.SurfaceArea.netstandard20.debug.bsl | 26 ++++++++++++++++--- ...vice.SurfaceArea.netstandard20.release.bsl | 26 ++++++++++++++++--- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index 32cad895835..afaf30c80a0 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -6158,6 +6158,26 @@ FSharp.Compiler.Syntax.Ident: System.String ToString() FSharp.Compiler.Syntax.Ident: System.String get_idText() FSharp.Compiler.Syntax.Ident: System.String idText FSharp.Compiler.Syntax.Ident: Void .ctor(System.String, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident FieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident fieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_FieldName() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_fieldName() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat pat +FSharp.Compiler.Syntax.NamePatPairField: Int32 Tag +FSharp.Compiler.Syntax.NamePatPairField: Int32 get_Tag() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] Range +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] equalsRange +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_Range() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() +FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() FSharp.Compiler.Syntax.ParsedHashDirective: FSharp.Compiler.Syntax.ParsedHashDirective NewParsedHashDirective(System.String, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirectiveArgument], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.ParsedHashDirective: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.ParsedHashDirective: FSharp.Compiler.Text.Range range @@ -6545,8 +6565,8 @@ FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.SyntaxTrivia.Syn FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia trivia FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.Ident,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] get_pats() -FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.Ident,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] pats +FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] get_pats() +FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] pats FSharp.Compiler.Syntax.SynArgPats+Pats: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat] get_pats() FSharp.Compiler.Syntax.SynArgPats+Pats: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat] pats FSharp.Compiler.Syntax.SynArgPats+Tags: Int32 NamePatPairs @@ -6555,7 +6575,7 @@ FSharp.Compiler.Syntax.SynArgPats: Boolean IsNamePatPairs FSharp.Compiler.Syntax.SynArgPats: Boolean IsPats FSharp.Compiler.Syntax.SynArgPats: Boolean get_IsNamePatPairs() FSharp.Compiler.Syntax.SynArgPats: Boolean get_IsPats() -FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats NewNamePatPairs(Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.Ident,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia) +FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats NewNamePatPairs(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia) FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats NewPats(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat]) FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats+NamePatPairs FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats+Pats diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index 32cad895835..afaf30c80a0 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -6158,6 +6158,26 @@ FSharp.Compiler.Syntax.Ident: System.String ToString() FSharp.Compiler.Syntax.Ident: System.String get_idText() FSharp.Compiler.Syntax.Ident: System.String idText FSharp.Compiler.Syntax.Ident: Void .ctor(System.String, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident FieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident fieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_FieldName() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_fieldName() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat pat +FSharp.Compiler.Syntax.NamePatPairField: Int32 Tag +FSharp.Compiler.Syntax.NamePatPairField: Int32 get_Tag() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] Range +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] equalsRange +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_Range() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() +FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() FSharp.Compiler.Syntax.ParsedHashDirective: FSharp.Compiler.Syntax.ParsedHashDirective NewParsedHashDirective(System.String, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.ParsedHashDirectiveArgument], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.ParsedHashDirective: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.ParsedHashDirective: FSharp.Compiler.Text.Range range @@ -6545,8 +6565,8 @@ FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.SyntaxTrivia.Syn FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia trivia FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.Ident,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] get_pats() -FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.Ident,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] pats +FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] get_pats() +FSharp.Compiler.Syntax.SynArgPats+NamePatPairs: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] pats FSharp.Compiler.Syntax.SynArgPats+Pats: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat] get_pats() FSharp.Compiler.Syntax.SynArgPats+Pats: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat] pats FSharp.Compiler.Syntax.SynArgPats+Tags: Int32 NamePatPairs @@ -6555,7 +6575,7 @@ FSharp.Compiler.Syntax.SynArgPats: Boolean IsNamePatPairs FSharp.Compiler.Syntax.SynArgPats: Boolean IsPats FSharp.Compiler.Syntax.SynArgPats: Boolean get_IsNamePatPairs() FSharp.Compiler.Syntax.SynArgPats: Boolean get_IsPats() -FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats NewNamePatPairs(Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.Ident,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia) +FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats NewNamePatPairs(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynArgPatsNamePatPairsTrivia) FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats NewPats(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat]) FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats+NamePatPairs FSharp.Compiler.Syntax.SynArgPats: FSharp.Compiler.Syntax.SynArgPats+Pats From 9e7bb642a6275f3f719f0759cd81be9e4c10c819 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Mon, 18 Aug 2025 15:18:12 +0100 Subject: [PATCH 09/32] ILVerify --- .../ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl | 2 +- .../ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index aad32880f1b..11e527dd515 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -34,7 +34,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1422-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 929d9360375..36fe9aa80f5 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -33,7 +33,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1422-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. From 73ce649d0115ea1bab33264b8c8a8e655529611c Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Mon, 18 Aug 2025 17:40:52 +0100 Subject: [PATCH 10/32] release notes --- docs/release-notes/.FSharp.Compiler.Service/10.0.100.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md index ab9f379f87b..2e385c9645b 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -21,6 +21,7 @@ ### Changed * Use `errorR` instead of `error` in `CheckDeclarations.fs` when possible. ([PR #18645](https://github.com/dotnet/fsharp/pull/18645)) +* Parser: Capture named fields block separators. ([PR #18857](https://github.com/dotnet/fsharp/pull/18857)) ### Breaking Changes From 1830711015879ea1bc94557f496426a2ff8216fe Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Mon, 18 Aug 2025 19:37:41 +0100 Subject: [PATCH 11/32] Trying to fix editor test --- src/Compiler/Service/ServiceParsedInputOps.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index ebb59d870bc..f422c38deb5 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -1301,7 +1301,7 @@ module ParsedInput = let context = Some(PatternContext.NamedUnionCaseField(field.FieldName.idText, caseId.Range)) - TryGetCompletionContextInPattern suppressIdentifierCompletions pat context pos) + TryGetCompletionContextInPattern suppressIdentifierCompletions field.Pattern context pos) |> Option.orElseWith (fun () -> // Last resort - check for fun (Case (item1 = a; | )) -> // That is, pos is after the last pair and still within parentheses From da51899dae7d62b29b28864f6209bb870af1bd59 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 19:38:17 +0100 Subject: [PATCH 12/32] Capture also block separators in SynPat.Record --- src/Compiler/Checking/CheckPatterns.fs | 2 +- .../GraphChecking/FileContentMapping.fs | 15 +------ src/Compiler/Service/ServiceParseTreeWalk.fs | 2 +- src/Compiler/Service/ServiceParsedInputOps.fs | 15 ++++--- src/Compiler/SyntaxTree/SyntaxTree.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTree.fsi | 2 +- src/Compiler/pars.fsy | 39 ++++++++++++------- 7 files changed, 41 insertions(+), 36 deletions(-) diff --git a/src/Compiler/Checking/CheckPatterns.fs b/src/Compiler/Checking/CheckPatterns.fs index f40adff07fd..01eab102533 100644 --- a/src/Compiler/Checking/CheckPatterns.fs +++ b/src/Compiler/Checking/CheckPatterns.fs @@ -457,7 +457,7 @@ and TcPatArrayOrList warnOnUpper cenv env vFlags patEnv ty isArray args m = phase2, acc and TcRecordPat warnOnUpper (cenv: cenv) env vFlags patEnv ty fieldPats m = - let fieldPats = fieldPats |> List.map (fun (fieldId, _, fieldPat) -> fieldId, fieldPat) + let fieldPats = fieldPats |> List.map (fun (field: NamePatPairField) -> ([], field.FieldName), field.Pattern) match BuildFieldMap cenv env false ty fieldPats m with | None -> (fun _ -> TPat_error m), patEnv | Some(tinst, tcref, fldsmap, _fldsList) -> diff --git a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs index 85026fcbb5d..efa1b935fc8 100644 --- a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs +++ b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs @@ -622,20 +622,9 @@ let visitPat (p: SynPat) : FileContentEntry list = let continuations = List.map visit elementPats Continuation.concatenate continuations continuation | SynPat.Record(fieldPats, _) -> - let pats = List.map (fun (_, _, p) -> p) fieldPats - - let lids = - [ - for (l, _), _, _ in fieldPats do - yield! visitLongIdent l - ] - + let pats = fieldPats |> List.map (fun f -> f.Pattern) let continuations = List.map visit pats - - let finalContinuation nodes = - [ yield! List.concat nodes; yield! lids ] |> continuation - - Continuation.sequence continuations finalContinuation + Continuation.concatenate continuations continuation | SynPat.Null _ -> continuation [] | SynPat.OptionalVal _ -> continuation [] | SynPat.IsInst(t, _) -> continuation (visitSynType t) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index eaeef359e7a..ae7601816bc 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -772,7 +772,7 @@ module SyntaxTraversal = | SynPat.Ands(ps, _) | SynPat.Tuple(elementPats = ps) | SynPat.ArrayOrList(_, ps, _) -> ps |> List.tryPick (traversePat path) - | SynPat.Record(fieldPats = fieldPats) -> fieldPats |> List.tryPick (fun (_, _, p) -> traversePat path p) + | SynPat.Record(fieldPats = fieldPats) -> fieldPats |> List.map _.Pattern |> List.tryPick (traversePat path) | SynPat.Attrib(p, attributes, m) -> match traversePat path p with | None -> attributeApplicationDives path attributes |> pick m attributes diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index f422c38deb5..4adec74cdc4 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -1337,9 +1337,11 @@ module ParsedInput = |> List.tryPick (fun pat -> TryGetCompletionContextInPattern false pat None pos) | SynPat.Record(fieldPats = pats; range = m) when rangeContainsPos m pos -> pats - |> List.tryPick (fun ((_, fieldId), _, pat) -> + |> List.tryPick (fun f -> + let fieldId = f.FieldName + let pat = f.Pattern if rangeContainsPos fieldId.idRange pos then - let referencedFields = pats |> List.map (fun ((_, x), _, _) -> x.idText, x.idRange) + let referencedFields = pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) Some(CompletionContext.Pattern(PatternContext.RecordFieldIdentifier referencedFields)) elif rangeContainsPos pat.Range pos then TryGetCompletionContextInPattern false pat None pos @@ -1350,13 +1352,16 @@ module ParsedInput = // That is, pos is after the last field and still within braces if pats - |> List.forall (fun (_, mEquals, pat) -> - match mEquals, pat with + |> List.forall (fun f -> + let mEqualsOpt = + match f with + | NamePatPairField(equalsRange = m) -> m + match mEqualsOpt, f.Pattern with | Some mEquals, SynPat.Wild mPat -> rangeBeforePos mEquals pos && mPat.StartColumn <> mPat.EndColumn | Some mEquals, _ -> rangeBeforePos mEquals pos | _ -> false) then - let referencedFields = pats |> List.map (fun ((_, x), _, _) -> x.idText, x.idRange) + let referencedFields = pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) Some(CompletionContext.Pattern(PatternContext.RecordFieldIdentifier referencedFields)) else Some(CompletionContext.Pattern PatternContext.Other)) diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 57c026177c1..66bbafce2c0 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -987,7 +987,7 @@ type SynPat = | ArrayOrList of isArray: bool * elementPats: SynPat list * range: range - | Record of fieldPats: ((LongIdent * Ident) * range option * SynPat) list * range: range + | Record of fieldPats: NamePatPairField list * range: range | Null of range: range diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 9ba76184175..dfaecb19859 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1129,7 +1129,7 @@ type SynPat = | ArrayOrList of isArray: bool * elementPats: SynPat list * range: range /// A record pattern - | Record of fieldPats: ((LongIdent * Ident) * range option * SynPat) list * range: range + | Record of fieldPats: NamePatPairField list * range: range /// The 'null' pattern | Null of range: range diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 79743d8d7e5..158b14595f2 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -4002,28 +4002,39 @@ conjParenPatternElements: { $3 :: $1 :: [] } recordPatternElementsAux: - | recordPatternElement opt_seps - { [$1] } + | recordPatternElement opt_seps_block + { let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + [ NamePatPairField(id, mEq, Some m, pat, $2) ] } - | recordPatternElement seps recordPatternElementsAux - { $1 :: $3 } + | recordPatternElement seps_block recordPatternElementsAux + { let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + NamePatPairField(id, mEq, Some m, pat, Some $2) :: $3 } + + | recordPatternElement seps_block seps_block recordPatternElementsAux + { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) + let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + NamePatPairField(id, mEq, Some m, pat, Some $2) :: $4 } recordPatternElement: | path EQUALS parenPattern - { let mPath = $1.Range - let mEquals = rhs parseState 2 - let mPat = $3.Range - List.frontAndBack $1.LongIdent, Some mEquals, $3 } + { let mEquals = rhs parseState 2 + let lid = $1.LongIdent + let id = List.last lid + id, Some mEquals, $3 } | path EQUALS recover - { let mPath = $1.Range - let mEquals = rhs parseState 2 - let pat = SynPat.Wild(mEquals.EndRange) - List.frontAndBack $1.LongIdent, Some mEquals, pat } + { let mEquals = rhs parseState 2 + let lid = $1.LongIdent + let id = List.last lid + id, Some mEquals, patFromParseError (SynPat.Wild mEquals.EndRange) } | path recover - { let pat = SynPat.Wild($1.Range.EndRange) - List.frontAndBack $1.LongIdent, None, pat } + { let lid = $1.LongIdent + let id = List.last lid + id, None, patFromParseError (SynPat.Wild $1.Range.EndRange) } listPatternElements: | /* EMPTY */ From 1aff181db49ba046d583cb25f253a2f2b86745d9 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 19:38:35 +0100 Subject: [PATCH 13/32] update baselines --- ...ervice.SurfaceArea.netstandard20.debug.bsl | 6 +- ...vice.SurfaceArea.netstandard20.release.bsl | 6 +- ..._FSharp.Compiler.Service_Debug_net10.0.bsl | 32 ++++---- ....Compiler.Service_Debug_netstandard2.0.bsl | 36 ++++----- ...Sharp.Compiler.Service_Release_net10.0.bsl | 56 ++++++------- ...ompiler.Service_Release_netstandard2.0.bsl | 78 +++++++++---------- 6 files changed, 107 insertions(+), 107 deletions(-) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index afaf30c80a0..643fe576a5f 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -8780,8 +8780,8 @@ FSharp.Compiler.Syntax.SynPat+QuoteExpr: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynPat+QuoteExpr: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynPat+Record: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynPat+Record: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident],FSharp.Compiler.Syntax.Ident],Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] fieldPats -FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident],FSharp.Compiler.Syntax.Ident],Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] get_fieldPats() +FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] fieldPats +FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] get_fieldPats() FSharp.Compiler.Syntax.SynPat+Tags: Int32 Ands FSharp.Compiler.Syntax.SynPat+Tags: Int32 ArrayOrList FSharp.Compiler.Syntax.SynPat+Tags: Int32 As @@ -8874,7 +8874,7 @@ FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewOptionalVal(FSha FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewOr(FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynPatOrTrivia) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewParen(FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewQuoteExpr(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewRecord(Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident],FSharp.Compiler.Syntax.Ident],Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]], FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewRecord(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewTuple(Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewTyped(FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewWild(FSharp.Compiler.Text.Range) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index afaf30c80a0..643fe576a5f 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -8780,8 +8780,8 @@ FSharp.Compiler.Syntax.SynPat+QuoteExpr: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynPat+QuoteExpr: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynPat+Record: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynPat+Record: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident],FSharp.Compiler.Syntax.Ident],Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] fieldPats -FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident],FSharp.Compiler.Syntax.Ident],Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]] get_fieldPats() +FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] fieldPats +FSharp.Compiler.Syntax.SynPat+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField] get_fieldPats() FSharp.Compiler.Syntax.SynPat+Tags: Int32 Ands FSharp.Compiler.Syntax.SynPat+Tags: Int32 ArrayOrList FSharp.Compiler.Syntax.SynPat+Tags: Int32 As @@ -8874,7 +8874,7 @@ FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewOptionalVal(FSha FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewOr(FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynPatOrTrivia) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewParen(FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewQuoteExpr(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewRecord(Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident],FSharp.Compiler.Syntax.Ident],Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynPat]], FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewRecord(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.NamePatPairField], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewTuple(Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewTyped(FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynPat: FSharp.Compiler.Syntax.SynPat NewWild(FSharp.Compiler.Text.Range) diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl index 9bfdb8bbc1e..271af301d70 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl @@ -15,20 +15,20 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -42,13 +42,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -58,15 +58,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4445::Invoke([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+RowKind)][offset 0x00000128][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 1ca6bd321ee..1f0d7e1bd39 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -15,11 +15,18 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x0000008A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000026] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000069][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. @@ -28,19 +35,12 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1429-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. @@ -59,7 +59,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000033][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000063][found Char] Unexpected type on the stack. @@ -67,8 +67,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -83,15 +83,15 @@ [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl index eb4a3a6eef8..95c836f0ded 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl @@ -15,30 +15,30 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000007C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-852::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-1009::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::parseOption@266(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getSwitch@324(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::attempt@372([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000A99][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+parseOption@269::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getSwitch@325::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt@373::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000CA9][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000059C][found Char] Unexpected type on the stack. @@ -46,16 +46,16 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000A8][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AC][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x0000008E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x0000004B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000054][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001182][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x0000118B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B21][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x000004E2][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000071][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x00001182][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x0000118B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B8C][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000050D][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000073][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+pushShadowedLocals@959::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000001C0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000080][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x000000A1][found Byte] Unexpected type on the stack. @@ -74,26 +74,26 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000038][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000058][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadGenericParamConstraintIdx([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+ILMetadataReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, int32)][offset 0x00000025][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::rowKindSize$cont@4446(bool, bool, bool, bool[], bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000E5][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B6][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B4][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadInterfaceImpls@2263-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadGenericParamConstraints@2328-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+enclIdx@2357-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadMethodImpls@3131-4::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadEvents@3211-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadProperties@3281-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4446-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000FD][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000041][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array::loop@274-3(bool[], int32)][offset 0x00000008][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array+loop@275-3::Invoke(int32)][offset 0x00000012][found Byte] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 6050cc7b5b1..b612c291f9f 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -15,45 +15,45 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x00000060][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000023] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x0000003F][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000007C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-852::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-1009::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x00000024][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000004C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1424-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1429-12::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000010][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000017][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::parseOption@266(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getSwitch@324(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::attempt@372([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000A99][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::processArg@332([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x0000003E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::subSystemVersionSwitch$cont@656([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+parseOption@269::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getSwitch@325::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt@373::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000CA9][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+processArg@333::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x0000003F][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+subSystemVersionSwitch@656::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+ResponseFile+parseLine@239::Invoke(string)][offset 0x00000026][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. @@ -64,19 +64,19 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000B3][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000034][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000074][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000A8][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AC][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x0000008E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x0000004B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000054][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001182][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x0000118B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B21][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x000004E2][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000071][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x00001182][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x0000118B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B8C][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000050D][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000073][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+pushShadowedLocals@959::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000001C0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000080][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x000000A1][found Byte] Unexpected type on the stack. @@ -95,31 +95,31 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000038][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000058][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadGenericParamConstraintIdx([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+ILMetadataReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, int32)][offset 0x00000025][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::rowKindSize$cont@4446(bool, bool, bool, bool[], bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000E5][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B6][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B4][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadInterfaceImpls@2263-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadGenericParamConstraints@2328-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+enclIdx@2357-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadMethodImpls@3131-4::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadEvents@3211-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadProperties@3281-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4446-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000FD][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.NativeRes+VersionHelper::TryParse(string, bool, uint16, bool, [S.P.CoreLib]System.Version&)][offset 0x00000026][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseNamed@5310(uint8[], [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x0000007E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL+parseNamed@5311::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x0000008D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment::probePathForDotnetHost@316([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x000002F5][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x000002F8][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000041][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array::loop@274-3(bool[], int32)][offset 0x00000008][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array+loop@275-3::Invoke(int32)][offset 0x00000012][found Byte] Unexpected type on the stack. From 47a67bd21e981c612a014206fad1c67fc8cf6611 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 19:38:51 +0100 Subject: [PATCH 14/32] Update SyntaxTree tests --- ...ComplexArgumentsLambdaHasArrowRange.fs.bsl | 46 ++++++++++--------- .../DestructedLambdaHasArrowRange.fs.bsl | 26 ++++++----- .../data/SyntaxTree/Pattern/Record 01.fs.bsl | 14 +++--- .../data/SyntaxTree/Pattern/Record 02.fs.bsl | 18 +++++--- .../data/SyntaxTree/Pattern/Record 03.fs.bsl | 4 +- .../data/SyntaxTree/Pattern/Record 04.fs.bsl | 15 +++--- .../data/SyntaxTree/Pattern/Record 07.fs | 4 ++ .../data/SyntaxTree/Pattern/Record 07.fs.bsl | 31 +++++++++++++ .../SynType/Typed LetBang 07.fs.bsl | 10 ++-- .../SynType/Typed LetBang 08.fs.bsl | 9 ++-- .../SynType/Typed LetBang AndBang 03.fs.bsl | 30 +++++++----- .../SynType/Typed LetBang AndBang 04.fs.bsl | 28 ++++++----- .../SynType/Typed LetBang AndBang 05.fs.bsl | 30 +++++++----- 13 files changed, 169 insertions(+), 96 deletions(-) create mode 100644 tests/service/data/SyntaxTree/Pattern/Record 07.fs create mode 100644 tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl diff --git a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl index 930c7d13e77..783a79d2e2e 100644 --- a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl @@ -25,14 +25,15 @@ ImplFile (NoneAtInvisible, Ident _arg2, [SynMatchClause (Record - ([(([], Y), Some (3,9--3,10), - ListCons - (Named - (SynIdent (h, None), false, None, - (3,11--3,12)), Wild (3,14--3,15), - (3,11--3,15), - { ColonColonRange = (3,12--3,14) }))], - (3,5--3,17)), None, + ([NamePatPairField + (Y, Some (3,9--3,10), Some (3,7--3,15), + ListCons + (Named + (SynIdent (h, None), false, None, + (3,11--3,12)), Wild (3,14--3,15), + (3,11--3,15), + { ColonColonRange = (3,12--3,14) }), + None)], (3,5--3,17)), None, Match (NoneAtInvisible, Ident _arg1, [SynMatchClause @@ -88,12 +89,14 @@ ImplFile (2,4--2,10)); Paren (Record - ([(([], Y), Some (3,9--3,10), - ListCons - (Named - (SynIdent (h, None), false, None, (3,11--3,12)), - Wild (3,14--3,15), (3,11--3,15), - { ColonColonRange = (3,12--3,14) }))], + ([NamePatPairField + (Y, Some (3,9--3,10), Some (3,7--3,15), + ListCons + (Named + (SynIdent (h, None), false, None, + (3,11--3,12)), Wild (3,14--3,15), + (3,11--3,15), + { ColonColonRange = (3,12--3,14) }), None)], (3,5--3,17)), (3,4--3,18)); Paren (LongIdent @@ -108,13 +111,14 @@ ImplFile (NoneAtInvisible, Ident _arg2, [SynMatchClause (Record - ([(([], Y), Some (3,9--3,10), - ListCons - (Named - (SynIdent (h, None), false, None, - (3,11--3,12)), Wild (3,14--3,15), - (3,11--3,15), - { ColonColonRange = (3,12--3,14) }))], + ([NamePatPairField + (Y, Some (3,9--3,10), Some (3,7--3,15), + ListCons + (Named + (SynIdent (h, None), false, None, + (3,11--3,12)), Wild (3,14--3,15), + (3,11--3,15), + { ColonColonRange = (3,12--3,14) }), None)], (3,5--3,17)), None, Match (NoneAtInvisible, Ident _arg1, diff --git a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl index 3f1c530f9d5..189121bcc53 100644 --- a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl @@ -14,10 +14,11 @@ ImplFile (NoneAtInvisible, Ident _arg1, [SynMatchClause (Record - ([(([], X), Some (2,8--2,9), - Named - (SynIdent (x, None), false, None, (2,10--2,11)))], - (2,4--2,13)), None, + ([NamePatPairField + (X, Some (2,8--2,9), Some (2,6--2,11), + Named + (SynIdent (x, None), false, None, (2,10--2,11)), + None)], (2,4--2,13)), None, App (NonAtomic, false, App @@ -35,17 +36,20 @@ ImplFile WithKeyword = (2,4--2,22) }), Some ([Record - ([(([], X), Some (2,8--2,9), - Named (SynIdent (x, None), false, None, (2,10--2,11)))], - (2,4--2,13))], + ([NamePatPairField + (X, Some (2,8--2,9), Some (2,6--2,11), + Named + (SynIdent (x, None), false, None, (2,10--2,11)), + None)], (2,4--2,13))], Match (NoneAtInvisible, Ident _arg1, [SynMatchClause (Record - ([(([], X), Some (2,8--2,9), - Named - (SynIdent (x, None), false, None, (2,10--2,11)))], - (2,4--2,13)), None, + ([NamePatPairField + (X, Some (2,8--2,9), Some (2,6--2,11), + Named + (SynIdent (x, None), false, None, + (2,10--2,11)), None)], (2,4--2,13)), None, App (NonAtomic, false, App diff --git a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl index 303bae43f43..d7681f2848a 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl @@ -8,12 +8,14 @@ ImplFile (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), [SynMatchClause (Record - ([(([], A), Some (4,6--4,7), Wild (4,8--4,9))], - (4,2--4,11)), None, Const (Unit, (4,15--4,17)), - (4,2--4,17), Yes, { ArrowRange = Some (4,12--4,14) - BarRange = Some (4,0--4,1) })], - (3,0--4,17), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,17))], + ([NamePatPairField + (A, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), + None)], (4,2--4,11)), None, + Const (Unit, (4,15--4,17)), (4,2--4,17), Yes, + { ArrowRange = Some (4,12--4,14) + BarRange = Some (4,0--4,1) })], (3,0--4,17), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,17))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl index ad2b42fb23d..3b3dc80e310 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl @@ -8,13 +8,17 @@ ImplFile (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), [SynMatchClause (Record - ([(([], A), Some (4,6--4,7), Wild (4,8--4,9)); - (([], B), Some (4,13--4,14), Wild (4,15--4,16))], - (4,2--4,18)), None, Const (Unit, (4,22--4,24)), - (4,2--4,24), Yes, { ArrowRange = Some (4,19--4,21) - BarRange = Some (4,0--4,1) })], - (3,0--4,24), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,24))], + ([NamePatPairField + (A, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), + Some ((4,9--4,10), Some (4,10))); + NamePatPairField + (B, Some (4,13--4,14), Some (4,11--4,16), + Wild (4,15--4,16), None)], (4,2--4,18)), None, + Const (Unit, (4,22--4,24)), (4,2--4,24), Yes, + { ArrowRange = Some (4,19--4,21) + BarRange = Some (4,0--4,1) })], (3,0--4,24), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,24))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl index f4d874a415d..bf35cd4b369 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl @@ -8,7 +8,9 @@ ImplFile (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), [SynMatchClause (Record - ([(([], A), Some (4,6--4,7), Wild (4,7--4,7))], + ([NamePatPairField + (A, Some (4,6--4,7), Some (4,4--4,7), + FromParseError (Wild (4,7--4,7), (4,7--4,7)), None)], (4,2--4,9)), None, Const (Unit, (4,13--4,15)), (4,2--4,15), Yes, { ArrowRange = Some (4,10--4,12) BarRange = Some (4,0--4,1) })], diff --git a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl index 60303d5874d..c705cb79483 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl @@ -7,12 +7,15 @@ ImplFile (Match (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), [SynMatchClause - (Record ([(([], A), None, Wild (4,5--4,5))], (4,2--4,7)), - None, Const (Unit, (4,11--4,13)), (4,2--4,13), Yes, - { ArrowRange = Some (4,8--4,10) - BarRange = Some (4,0--4,1) })], (3,0--4,13), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,13))], + (Record + ([NamePatPairField + (A, None, Some (4,4--4,5), + FromParseError (Wild (4,5--4,5), (4,5--4,5)), None)], + (4,2--4,7)), None, Const (Unit, (4,11--4,13)), + (4,2--4,13), Yes, { ArrowRange = Some (4,8--4,10) + BarRange = Some (4,0--4,1) })], + (3,0--4,13), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,13))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,13), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Record 07.fs b/tests/service/data/SyntaxTree/Pattern/Record 07.fs new file mode 100644 index 00000000000..ae91e315e44 --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Record 07.fs @@ -0,0 +1,4 @@ +module Module + +match () with +| { A = 1; B = 2; C = 3 } -> () diff --git a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl new file mode 100644 index 00000000000..b335169a274 --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl @@ -0,0 +1,31 @@ +ImplFile + (ParsedImplFileInput + ("/root/Pattern/Record 07.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Match + (Yes (3,0--3,13), Const (Unit, (3,6--3,8)), + [SynMatchClause + (Record + ([NamePatPairField + (A, Some (4,6--4,7), Some (4,4--4,9), + Const (Int32 1, (4,8--4,9)), + Some ((4,9--4,10), Some (4,10))); + NamePatPairField + (B, Some (4,13--4,14), Some (4,11--4,16), + Const (Int32 2, (4,15--4,16)), + Some ((4,16--4,17), Some (4,17))); + NamePatPairField + (C, Some (4,20--4,21), Some (4,18--4,23), + Const (Int32 3, (4,22--4,23)), None)], (4,2--4,25)), + None, Const (Unit, (4,29--4,31)), (4,2--4,31), Yes, + { ArrowRange = Some (4,26--4,28) + BarRange = Some (4,0--4,1) })], (3,0--4,31), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,31))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,31), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl index 0abee0c68bc..a59452e983b 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl @@ -19,10 +19,12 @@ ImplFile Paren (Typed (Record - ([(([], Name), Some (3,17--3,18), - Named - (SynIdent (name, None), false, None, - (3,19--3,23)))], (3,10--3,25)), + ([NamePatPairField + (Name, Some (3,17--3,18), + Some (3,12--3,23), + Named + (SynIdent (name, None), false, None, + (3,19--3,23)), None)], (3,10--3,25)), LongIdent (SynLongIdent ([Person], [], [None])), (3,10--3,33)), (3,9--3,34)), None, App diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl index 8bb584f47e5..6f7153181b5 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl @@ -18,10 +18,11 @@ ImplFile None), Typed (Record - ([(([], Name), Some (3,16--3,17), - Named - (SynIdent (name, None), false, None, - (3,18--3,22)))], (3,9--3,24)), + ([NamePatPairField + (Name, Some (3,16--3,17), Some (3,11--3,22), + Named + (SynIdent (name, None), false, None, + (3,18--3,22)), None)], (3,9--3,24)), LongIdent (SynLongIdent ([Person], [], [None])), (3,9--3,32)), None, App diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl index 9ce3159e223..2eac8949246 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl @@ -20,14 +20,19 @@ ImplFile Paren (Typed (Record - ([(([], Name), Some (4,17--4,18), - Named - (SynIdent (name, None), false, None, - (4,19--4,23))); - (([], Age), Some (4,29--4,30), - Named - (SynIdent (age, None), false, None, - (4,31--4,34)))], (4,10--4,36)), + ([NamePatPairField + (Name, Some (4,17--4,18), + Some (4,12--4,23), + Named + (SynIdent (name, None), false, None, + (4,19--4,23)), + Some ((4,23--4,24), Some (4,24))); + NamePatPairField + (Age, Some (4,29--4,30), + Some (4,25--4,34), + Named + (SynIdent (age, None), false, None, + (4,31--4,34)), None)], (4,10--4,36)), LongIdent (SynLongIdent ([Person], [], [None])), (4,10--4,44)), (4,9--4,45)), None, App @@ -46,10 +51,11 @@ ImplFile Paren (Typed (Record - ([(([], Id), Some (5,15--5,16), - Named - (SynIdent (id, None), false, None, - (5,17--5,19)))], (5,10--5,21)), + ([NamePatPairField + (Id, Some (5,15--5,16), Some (5,12--5,19), + Named + (SynIdent (id, None), false, None, + (5,17--5,19)), None)], (5,10--5,21)), LongIdent (SynLongIdent ([User], [], [None])), (5,10--5,27)), (5,9--5,28)), None, App diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl index 8f192d0e7f0..1a0c14940ba 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl @@ -19,14 +19,17 @@ ImplFile None), Typed (Record - ([(([], Name), Some (4,16--4,17), - Named - (SynIdent (name, None), false, None, - (4,18--4,22))); - (([], Age), Some (4,28--4,29), - Named - (SynIdent (age, None), false, None, - (4,30--4,33)))], (4,9--4,35)), + ([NamePatPairField + (Name, Some (4,16--4,17), Some (4,11--4,22), + Named + (SynIdent (name, None), false, None, + (4,18--4,22)), + Some ((4,22--4,23), Some (4,23))); + NamePatPairField + (Age, Some (4,28--4,29), Some (4,24--4,33), + Named + (SynIdent (age, None), false, None, + (4,30--4,33)), None)], (4,9--4,35)), LongIdent (SynLongIdent ([Person], [], [None])), (4,9--4,43)), None, App @@ -44,10 +47,11 @@ ImplFile None), Typed (Record - ([(([], Id), Some (5,14--5,15), - Named - (SynIdent (id, None), false, None, - (5,16--5,18)))], (5,9--5,20)), + ([NamePatPairField + (Id, Some (5,14--5,15), Some (5,11--5,18), + Named + (SynIdent (id, None), false, None, + (5,16--5,18)), None)], (5,9--5,20)), LongIdent (SynLongIdent ([User], [], [None])), (5,9--5,26)), None, App diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl index f1c41fa9742..f5e6bddb5ad 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl @@ -20,14 +20,19 @@ ImplFile Paren (Typed (Record - ([(([], Name), Some (4,17--4,18), - Named - (SynIdent (name, None), false, None, - (4,19--4,23))); - (([], Age), Some (4,29--4,30), - Named - (SynIdent (age, None), false, None, - (4,31--4,34)))], (4,10--4,36)), + ([NamePatPairField + (Name, Some (4,17--4,18), + Some (4,12--4,23), + Named + (SynIdent (name, None), false, None, + (4,19--4,23)), + Some ((4,23--4,24), Some (4,24))); + NamePatPairField + (Age, Some (4,29--4,30), + Some (4,25--4,34), + Named + (SynIdent (age, None), false, None, + (4,31--4,34)), None)], (4,10--4,36)), LongIdent (SynLongIdent ([Person], [], [None])), (4,10--4,44)), (4,9--4,45)), None, App @@ -45,10 +50,11 @@ ImplFile None), Typed (Record - ([(([], Id), Some (5,14--5,15), - Named - (SynIdent (id, None), false, None, - (5,16--5,18)))], (5,9--5,20)), + ([NamePatPairField + (Id, Some (5,14--5,15), Some (5,11--5,18), + Named + (SynIdent (id, None), false, None, + (5,16--5,18)), None)], (5,9--5,20)), LongIdent (SynLongIdent ([User], [], [None])), (5,9--5,26)), None, App From 01c97a9b4f97ca2cccd528f579bccfa5e05d8194 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 19:39:20 +0100 Subject: [PATCH 15/32] format code --- src/Compiler/Service/ServiceParsedInputOps.fs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 4adec74cdc4..6dbc2e8433c 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -1340,8 +1340,11 @@ module ParsedInput = |> List.tryPick (fun f -> let fieldId = f.FieldName let pat = f.Pattern + if rangeContainsPos fieldId.idRange pos then - let referencedFields = pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) + let referencedFields = + pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) + Some(CompletionContext.Pattern(PatternContext.RecordFieldIdentifier referencedFields)) elif rangeContainsPos pat.Range pos then TryGetCompletionContextInPattern false pat None pos @@ -1356,12 +1359,15 @@ module ParsedInput = let mEqualsOpt = match f with | NamePatPairField(equalsRange = m) -> m + match mEqualsOpt, f.Pattern with | Some mEquals, SynPat.Wild mPat -> rangeBeforePos mEquals pos && mPat.StartColumn <> mPat.EndColumn | Some mEquals, _ -> rangeBeforePos mEquals pos | _ -> false) then - let referencedFields = pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) + let referencedFields = + pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) + Some(CompletionContext.Pattern(PatternContext.RecordFieldIdentifier referencedFields)) else Some(CompletionContext.Pattern PatternContext.Other)) From c5e90401e97ba3840793575ad4a31beb369d3bcd Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 20:56:07 +0100 Subject: [PATCH 16/32] ILVerify --- ..._FSharp.Compiler.Service_Debug_net10.0.bsl | 32 ++++---- ....Compiler.Service_Debug_netstandard2.0.bsl | 36 ++++----- ...Sharp.Compiler.Service_Release_net10.0.bsl | 56 ++++++------- ...ompiler.Service_Release_netstandard2.0.bsl | 78 +++++++++---------- 4 files changed, 101 insertions(+), 101 deletions(-) diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl index 271af301d70..9bfdb8bbc1e 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl @@ -15,20 +15,20 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -42,13 +42,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -58,15 +58,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4445::Invoke([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+RowKind)][offset 0x00000128][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 1f0d7e1bd39..f46e5ae82fa 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -15,18 +15,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x0000008A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000026] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000069][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. @@ -35,12 +28,19 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1429-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1435-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. @@ -59,7 +59,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000033][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000063][found Char] Unexpected type on the stack. @@ -67,8 +67,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -83,15 +83,15 @@ [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl index 95c836f0ded..eb4a3a6eef8 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl @@ -15,30 +15,30 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000007C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-1009::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-852::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::parseOption@266(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getSwitch@324(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::attempt@372([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000A99][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+parseOption@269::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getSwitch@325::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt@373::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000CA9][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000059C][found Char] Unexpected type on the stack. @@ -46,16 +46,16 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AC][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000A8][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x0000008E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x0000004B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000054][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x00001182][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x0000118B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B8C][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000050D][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000073][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001182][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x0000118B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B21][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x000004E2][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000071][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+pushShadowedLocals@959::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000001C0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000080][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x000000A1][found Byte] Unexpected type on the stack. @@ -74,26 +74,26 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000038][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000058][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadGenericParamConstraintIdx([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+ILMetadataReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, int32)][offset 0x00000025][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B4][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::rowKindSize$cont@4446(bool, bool, bool, bool[], bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000E5][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B6][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadInterfaceImpls@2263-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadGenericParamConstraints@2328-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+enclIdx@2357-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadMethodImpls@3131-4::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadEvents@3211-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadProperties@3281-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4446-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000FD][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000041][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array+loop@275-3::Invoke(int32)][offset 0x00000012][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array::loop@274-3(bool[], int32)][offset 0x00000008][found Byte] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index b612c291f9f..90af427aaf9 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -15,45 +15,45 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000023] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-620::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000052][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000007C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x0000003F][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-1009::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-852::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x00000024][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000004C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1429-12::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1435-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-3::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags@286-1::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000017][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::parseOption@266(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList@306([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getSwitch@324(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::attempt@372([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000A99][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::processArg@332([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x0000003E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::subSystemVersionSwitch$cont@656([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+parseOption@269::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList@307::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getSwitch@325::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt@373::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000CA9][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+processArg@333::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x0000003F][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+subSystemVersionSwitch@656::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+ResponseFile+parseLine@239::Invoke(string)][offset 0x00000026][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode@1782::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. @@ -64,19 +64,19 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875-1'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted@1875'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000B3][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000034][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000074][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AC][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000A8][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x0000008E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x0000004B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000054][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x00001182][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x0000118B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B8C][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000050D][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000073][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001182][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x0000118B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B21][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x000004E2][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000071][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+pushShadowedLocals@959::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000001C0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000080][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x000000A1][found Byte] Unexpected type on the stack. @@ -95,31 +95,31 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000038][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000058][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadGenericParamConstraintIdx([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+ILMetadataReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, int32)][offset 0x00000025][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B4][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::rowKindSize$cont@4446(bool, bool, bool, bool[], bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000E5][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B6][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadInterfaceImpls@2263-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadGenericParamConstraints@2328-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+enclIdx@2357-2::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadMethodImpls@3131-4::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadEvents@3211-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadProperties@3281-3::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4446-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000FD][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.NativeRes+VersionHelper::TryParse(string, bool, uint16, bool, [S.P.CoreLib]System.Version&)][offset 0x00000026][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL+parseNamed@5311::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x0000008D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseNamed@5310(uint8[], [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x0000007E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x000002F8][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment::probePathForDotnetHost@316([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x000002F5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000041][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array+loop@275-3::Invoke(int32)][offset 0x00000012][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array::loop@274-3(bool[], int32)][offset 0x00000008][found Byte] Unexpected type on the stack. From 2e0ed54ce8b5e67403b7538080116dfd5a705c97 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 21:00:14 +0100 Subject: [PATCH 17/32] fix editor test --- src/Compiler/Service/FSharpCheckerResults.fs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index aa23d1534ab..19aeb634d72 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1450,7 +1450,7 @@ type internal TypeCheckInfo let GetCompletionsForRecordField pos referencedFields declaredItems = declaredItems |> Option.map (fun (items: CompletionItem list, denv, range) -> - let fields = + let availableFieldItems = // Try to find a name resolution for any of the referenced fields, and through it access all available fields of the record referencedFields |> List.tryPick (fun (_, fieldRange) -> @@ -1459,21 +1459,21 @@ type internal TypeCheckInfo match cnr.Item with | Item.RecdField info when equals cnr.Range fieldRange -> info.TyconRef.AllFieldAsRefList - |> List.choose (fun field -> - if - referencedFields - |> List.exists (fun (fieldName, _) -> fieldName = field.DisplayName) - then - None - else - FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField |> Some) + |> List.map (fun field -> FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField) |> Some | _ -> None)) |> Option.defaultWith (fun () -> // Fall back to showing all record field names in scope let (nenv, _), _ = GetBestEnvForPos pos getRecordFieldsInScope nenv) - |> List.map (ItemWithNoInst >> DefaultCompletionItem) + // Exclude already referenced fields regardless of the source above + |> List.filter (fun item -> + match item with + | Item.RecdField rf -> + referencedFields |> List.exists (fun (name, _) -> name = rf.DisplayName) |> not + | _ -> true) + + let fields = availableFieldItems |> List.map (ItemWithNoInst >> DefaultCompletionItem) let items = items From 26a86f615889c27565e4a0cd8a90d53b7ce44f98 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 21:00:43 +0100 Subject: [PATCH 18/32] fotmat code --- src/Compiler/Service/FSharpCheckerResults.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 19aeb634d72..82c7131cf43 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1469,11 +1469,11 @@ type internal TypeCheckInfo // Exclude already referenced fields regardless of the source above |> List.filter (fun item -> match item with - | Item.RecdField rf -> - referencedFields |> List.exists (fun (name, _) -> name = rf.DisplayName) |> not + | Item.RecdField rf -> referencedFields |> List.exists (fun (name, _) -> name = rf.DisplayName) |> not | _ -> true) - let fields = availableFieldItems |> List.map (ItemWithNoInst >> DefaultCompletionItem) + let fields = + availableFieldItems |> List.map (ItemWithNoInst >> DefaultCompletionItem) let items = items From 4a04c1e4a6c7d8da76f6e9fc09b75fe62effb5ac Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 21:27:44 +0100 Subject: [PATCH 19/32] Revert "fix editor test" This reverts commit 2e0ed54ce8b5e67403b7538080116dfd5a705c97. # Conflicts: # src/Compiler/Service/FSharpCheckerResults.fs --- src/Compiler/Service/FSharpCheckerResults.fs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 82c7131cf43..aa23d1534ab 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1450,7 +1450,7 @@ type internal TypeCheckInfo let GetCompletionsForRecordField pos referencedFields declaredItems = declaredItems |> Option.map (fun (items: CompletionItem list, denv, range) -> - let availableFieldItems = + let fields = // Try to find a name resolution for any of the referenced fields, and through it access all available fields of the record referencedFields |> List.tryPick (fun (_, fieldRange) -> @@ -1459,21 +1459,21 @@ type internal TypeCheckInfo match cnr.Item with | Item.RecdField info when equals cnr.Range fieldRange -> info.TyconRef.AllFieldAsRefList - |> List.map (fun field -> FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField) + |> List.choose (fun field -> + if + referencedFields + |> List.exists (fun (fieldName, _) -> fieldName = field.DisplayName) + then + None + else + FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField |> Some) |> Some | _ -> None)) |> Option.defaultWith (fun () -> // Fall back to showing all record field names in scope let (nenv, _), _ = GetBestEnvForPos pos getRecordFieldsInScope nenv) - // Exclude already referenced fields regardless of the source above - |> List.filter (fun item -> - match item with - | Item.RecdField rf -> referencedFields |> List.exists (fun (name, _) -> name = rf.DisplayName) |> not - | _ -> true) - - let fields = - availableFieldItems |> List.map (ItemWithNoInst >> DefaultCompletionItem) + |> List.map (ItemWithNoInst >> DefaultCompletionItem) let items = items From fc873814ec943fb23c6867303fb7f6e408007b0a Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 21:50:18 +0100 Subject: [PATCH 20/32] fix editor test --- src/Compiler/Service/FSharpCheckerResults.fs | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index aa23d1534ab..22d82f2948e 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1450,7 +1450,8 @@ type internal TypeCheckInfo let GetCompletionsForRecordField pos referencedFields declaredItems = declaredItems |> Option.map (fun (items: CompletionItem list, denv, range) -> - let fields = + // Build the list of available record fields, preferring those from the resolved record type if possible. + let availableFieldItems: Item list = // Try to find a name resolution for any of the referenced fields, and through it access all available fields of the record referencedFields |> List.tryPick (fun (_, fieldRange) -> @@ -1459,28 +1460,29 @@ type internal TypeCheckInfo match cnr.Item with | Item.RecdField info when equals cnr.Range fieldRange -> info.TyconRef.AllFieldAsRefList - |> List.choose (fun field -> - if - referencedFields - |> List.exists (fun (fieldName, _) -> fieldName = field.DisplayName) - then - None - else - FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField |> Some) + |> List.map (fun field -> FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField) |> Some | _ -> None)) |> Option.defaultWith (fun () -> // Fall back to showing all record field names in scope let (nenv, _), _ = GetBestEnvForPos pos getRecordFieldsInScope nenv) - |> List.map (ItemWithNoInst >> DefaultCompletionItem) + // Exclude already referenced fields regardless of the source above + |> List.filter (fun item -> + match item with + | Item.RecdField rf -> referencedFields |> List.exists (fun (name, _) -> name = rf.DisplayName) |> not + | _ -> true) + + let fields = + availableFieldItems |> List.map (ItemWithNoInst >> DefaultCompletionItem) let items = items |> List.filter (fun item -> match item.Item with | Item.ModuleOrNamespaces _ -> true - | Item.Types(_, ty :: _) -> isRecdTy g ty + | Item.UnionCase _ -> true + | Item.Types(_, ty :: _) -> isRecdTy g ty || isUnionTy g ty | _ -> false) |> List.append fields From 89e95dc8146fceb0602d1d3d1a41634a5ee4b993 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 19 Aug 2025 22:16:35 +0100 Subject: [PATCH 21/32] Revert "fix editor test" This reverts commit fc873814ec943fb23c6867303fb7f6e408007b0a. --- src/Compiler/Service/FSharpCheckerResults.fs | 24 +++++++++----------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 22d82f2948e..aa23d1534ab 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1450,8 +1450,7 @@ type internal TypeCheckInfo let GetCompletionsForRecordField pos referencedFields declaredItems = declaredItems |> Option.map (fun (items: CompletionItem list, denv, range) -> - // Build the list of available record fields, preferring those from the resolved record type if possible. - let availableFieldItems: Item list = + let fields = // Try to find a name resolution for any of the referenced fields, and through it access all available fields of the record referencedFields |> List.tryPick (fun (_, fieldRange) -> @@ -1460,29 +1459,28 @@ type internal TypeCheckInfo match cnr.Item with | Item.RecdField info when equals cnr.Range fieldRange -> info.TyconRef.AllFieldAsRefList - |> List.map (fun field -> FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField) + |> List.choose (fun field -> + if + referencedFields + |> List.exists (fun (fieldName, _) -> fieldName = field.DisplayName) + then + None + else + FreshenRecdFieldRef ncenv field.Range field |> Item.RecdField |> Some) |> Some | _ -> None)) |> Option.defaultWith (fun () -> // Fall back to showing all record field names in scope let (nenv, _), _ = GetBestEnvForPos pos getRecordFieldsInScope nenv) - // Exclude already referenced fields regardless of the source above - |> List.filter (fun item -> - match item with - | Item.RecdField rf -> referencedFields |> List.exists (fun (name, _) -> name = rf.DisplayName) |> not - | _ -> true) - - let fields = - availableFieldItems |> List.map (ItemWithNoInst >> DefaultCompletionItem) + |> List.map (ItemWithNoInst >> DefaultCompletionItem) let items = items |> List.filter (fun item -> match item.Item with | Item.ModuleOrNamespaces _ -> true - | Item.UnionCase _ -> true - | Item.Types(_, ty :: _) -> isRecdTy g ty || isUnionTy g ty + | Item.Types(_, ty :: _) -> isRecdTy g ty | _ -> false) |> List.append fields From 7f7d9632854c484b703befb69b3f9543884881a1 Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Wed, 20 Aug 2025 21:40:47 +0100 Subject: [PATCH 22/32] Add fieldPath to NamePatPairField --- src/Compiler/Checking/CheckPatterns.fs | 9 ++++- src/Compiler/SyntaxTree/SyntaxTree.fs | 5 +++ src/Compiler/SyntaxTree/SyntaxTree.fsi | 5 +++ src/Compiler/pars.fsy | 36 +++++++++--------- ...ervice.SurfaceArea.netstandard20.debug.bsl | 6 ++- ...vice.SurfaceArea.netstandard20.release.bsl | 6 ++- ..._FSharp.Compiler.Service_Debug_net10.0.bsl | 32 ++++++++-------- ....Compiler.Service_Debug_netstandard2.0.bsl | 34 ++++++++--------- ...ComplexArgumentsLambdaHasArrowRange.fs.bsl | 6 +-- .../DestructedLambdaHasArrowRange.fs.bsl | 6 +-- .../SyntaxTree/Pattern/Named field 01.fs.bsl | 4 +- .../SyntaxTree/Pattern/Named field 02.fs.bsl | 4 +- .../SyntaxTree/Pattern/Named field 03.fs.bsl | 4 +- .../SyntaxTree/Pattern/Named field 04.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 05.fs.bsl | 4 +- .../SyntaxTree/Pattern/Named field 06.fs.bsl | 6 +-- .../data/SyntaxTree/Pattern/Named field 07.fs | 4 ++ .../SyntaxTree/Pattern/Named field 07.fs.bsl | 37 +++++++++++++++++++ ...ParenthesesOfSynArgPatsNamePatPairs.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 01.fs.bsl | 4 +- .../data/SyntaxTree/Pattern/Record 02.fs.bsl | 6 +-- .../data/SyntaxTree/Pattern/Record 03.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 04.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 07.fs.bsl | 6 +-- ...airsContainsTheRangeOfTheEqualsSign.fs.bsl | 2 +- .../SynType/Typed LetBang 07.fs.bsl | 2 +- .../SynType/Typed LetBang 08.fs.bsl | 3 +- .../SynType/Typed LetBang AndBang 03.fs.bsl | 7 ++-- .../SynType/Typed LetBang AndBang 04.fs.bsl | 9 +++-- .../SynType/Typed LetBang AndBang 05.fs.bsl | 7 ++-- 30 files changed, 167 insertions(+), 95 deletions(-) create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 07.fs create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl diff --git a/src/Compiler/Checking/CheckPatterns.fs b/src/Compiler/Checking/CheckPatterns.fs index 01eab102533..4eee41e5393 100644 --- a/src/Compiler/Checking/CheckPatterns.fs +++ b/src/Compiler/Checking/CheckPatterns.fs @@ -457,7 +457,14 @@ and TcPatArrayOrList warnOnUpper cenv env vFlags patEnv ty isArray args m = phase2, acc and TcRecordPat warnOnUpper (cenv: cenv) env vFlags patEnv ty fieldPats m = - let fieldPats = fieldPats |> List.map (fun (field: NamePatPairField) -> ([], field.FieldName), field.Pattern) + let fieldPats = + fieldPats + |> List.map (fun (field: NamePatPairField) -> + let fieldId = + match field.FieldPath with + | Some path -> (path, field.FieldName) + | None -> ([], field.FieldName) + fieldId, field.Pattern) match BuildFieldMap cenv env false ty fieldPats m with | None -> (fun _ -> TPat_error m), patEnv | Some(tinst, tcref, fldsmap, _fldsList) -> diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 66bbafce2c0..ba2c4d4f3cb 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -923,12 +923,17 @@ type SynSimplePats = [] type NamePatPairField = | NamePatPairField of + fieldPath: Ident list option * fieldName: Ident * equalsRange: range option * range: range option * pat: SynPat * blockSeparator: BlockSeparator option + member this.FieldPath = + match this with + | NamePatPairField(fieldPath = p) -> p + member this.FieldName = match this with | NamePatPairField(fieldName = n) -> n diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index dfaecb19859..4987aea3c3b 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1050,6 +1050,8 @@ type SynSimplePats = [] type NamePatPairField = | NamePatPairField of + /// The full path to the field (for record patterns), if any. + fieldPath: Ident list option * /// The identifier of the named field/parameter. fieldName: Ident * /// The range of the equals sign in `name = pattern`, if present. @@ -1061,6 +1063,9 @@ type NamePatPairField = /// The separator trivia that follows this pair (e.g., semicolon or block separator), if any. blockSeparator: BlockSeparator option + /// Gets the full path to the field, if available. + member FieldPath: Ident list option + /// Gets the identifier of the named field/parameter. member FieldName: Ident diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 158b14595f2..aedc9f2589a 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3658,18 +3658,18 @@ namePatPairs: | namePatPair opt_seps_block { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - [ NamePatPairField(id, mEq, Some m, pat, $2) ] } + [ NamePatPairField(None, id, mEq, Some m, pat, $2) ] } | namePatPair seps_block namePatPairs { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - NamePatPairField(id, mEq, Some m, pat, Some $2) :: $3 } + NamePatPairField(None, id, mEq, Some m, pat, Some $2) :: $3 } | namePatPair seps_block seps_block namePatPairs { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - NamePatPairField(id, mEq, Some m, pat, Some $2) :: $4 } + NamePatPairField(None, id, mEq, Some m, pat, Some $2) :: $4 } namePatPair: | ident EQUALS parenPattern @@ -4003,38 +4003,38 @@ conjParenPatternElements: recordPatternElementsAux: | recordPatternElement opt_seps_block - { let (id: Ident), mEq, (pat: SynPat) = $1 + { let fullPath, (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - [ NamePatPairField(id, mEq, Some m, pat, $2) ] } + [ NamePatPairField(fullPath, id, mEq, Some m, pat, $2) ] } | recordPatternElement seps_block recordPatternElementsAux - { let (id: Ident), mEq, (pat: SynPat) = $1 + { let fullPath, (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - NamePatPairField(id, mEq, Some m, pat, Some $2) :: $3 } + NamePatPairField(fullPath, id, mEq, Some m, pat, Some $2) :: $3 } | recordPatternElement seps_block seps_block recordPatternElementsAux { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) - let (id: Ident), mEq, (pat: SynPat) = $1 + let fullPath, (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - NamePatPairField(id, mEq, Some m, pat, Some $2) :: $4 } + NamePatPairField(fullPath, id, mEq, Some m, pat, Some $2) :: $4 } recordPatternElement: | path EQUALS parenPattern { let mEquals = rhs parseState 2 - let lid = $1.LongIdent - let id = List.last lid - id, Some mEquals, $3 } + let path, id = List.frontAndBack $1.LongIdent + let fullPath = if List.isEmpty path then None else Some path + fullPath, id, Some mEquals, $3 } | path EQUALS recover { let mEquals = rhs parseState 2 - let lid = $1.LongIdent - let id = List.last lid - id, Some mEquals, patFromParseError (SynPat.Wild mEquals.EndRange) } + let path, id = List.frontAndBack $1.LongIdent + let fullPath = if List.isEmpty path then None else Some path + fullPath, id, Some mEquals, patFromParseError (SynPat.Wild mEquals.EndRange) } | path recover - { let lid = $1.LongIdent - let id = List.last lid - id, None, patFromParseError (SynPat.Wild $1.Range.EndRange) } + { let path, id = List.frontAndBack $1.LongIdent + let fullPath = if List.isEmpty path then None else Some path + fullPath, id, None, patFromParseError (SynPat.Wild $1.Range.EndRange) } listPatternElements: | /* EMPTY */ diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index 643fe576a5f..529f756feab 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -6162,7 +6162,7 @@ FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident FieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident fieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_FieldName() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_fieldName() -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]], FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() @@ -6175,6 +6175,10 @@ FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FS FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] FieldPath +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] fieldPath +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_FieldPath() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_fieldPath() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index 643fe576a5f..529f756feab 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -6162,7 +6162,7 @@ FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident FieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident fieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_FieldName() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_fieldName() -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]], FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() @@ -6175,6 +6175,10 @@ FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FS FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] FieldPath +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] fieldPath +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_FieldPath() +FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_fieldPath() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl index 9bfdb8bbc1e..271af301d70 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl @@ -15,20 +15,20 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -42,13 +42,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -58,15 +58,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4445::Invoke([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+RowKind)][offset 0x00000128][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index f46e5ae82fa..1df923d6ba4 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -15,11 +15,18 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x0000008A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000026] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000069][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. @@ -28,19 +35,12 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1435-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. @@ -59,7 +59,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000033][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000063][found Char] Unexpected type on the stack. @@ -67,8 +67,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -83,15 +83,15 @@ [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl index 783a79d2e2e..c4a8ef0d5c1 100644 --- a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl @@ -26,7 +26,7 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (Y, Some (3,9--3,10), Some (3,7--3,15), + (None, Y, Some (3,9--3,10), Some (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, @@ -90,7 +90,7 @@ ImplFile Paren (Record ([NamePatPairField - (Y, Some (3,9--3,10), Some (3,7--3,15), + (None, Y, Some (3,9--3,10), Some (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, @@ -112,7 +112,7 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (Y, Some (3,9--3,10), Some (3,7--3,15), + (None, Y, Some (3,9--3,10), Some (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, diff --git a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl index 189121bcc53..1c068c374f7 100644 --- a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl @@ -15,7 +15,7 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (X, Some (2,8--2,9), Some (2,6--2,11), + (None, X, Some (2,8--2,9), Some (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13)), None, @@ -37,7 +37,7 @@ ImplFile Some ([Record ([NamePatPairField - (X, Some (2,8--2,9), Some (2,6--2,11), + (None, X, Some (2,8--2,9), Some (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13))], @@ -46,7 +46,7 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (X, Some (2,8--2,9), Some (2,6--2,11), + (None, X, Some (2,8--2,9), Some (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13)), None, diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl index a274028de93..dce7d20ca35 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl @@ -11,10 +11,10 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (a, Some (4,6--4,7), Some (4,4--4,9), + (None, a, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (b, Some (4,13--4,14), Some (4,11--4,16), + (None, b, Some (4,13--4,14), Some (4,11--4,16), Wild (4,15--4,16), None)], (4,4--4,17), { ParenRange = (4,3--4,17) }), None, (4,2--4,17)), None, Const (Int32 2, (4,21--4,22)), (4,2--4,22), Yes, diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl index de730000e22..dac59a0fdd4 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl @@ -11,10 +11,10 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (a, Some (4,6--4,7), Some (4,4--4,9), + (None, a, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (b, Some (4,13--4,14), Some (4,11--4,14), + (None, b, Some (4,13--4,14), Some (4,11--4,14), FromParseError (Wild (4,14--4,14), (4,14--4,14)), None)], (4,4--4,16), { ParenRange = (4,3--4,16) }), None, (4,2--4,16)), None, Const (Int32 2, (4,20--4,21)), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 775dcee136b..b83a4d09960 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -11,10 +11,10 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (a, Some (4,6--4,7), Some (4,4--4,9), + (None, a, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (b, None, Some (4,11--4,12), + (None, b, None, Some (4,11--4,12), FromParseError (Wild (4,12--4,12), (4,12--4,12)), None)], (4,4--4,13), { ParenRange = (4,3--4,13) }), None, (4,2--4,13)), None, Const (Int32 2, (4,17--4,18)), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl index b91deff8a1f..6f417f1422f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl @@ -11,7 +11,7 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (a, Some (4,6--4,7), Some (4,4--4,9), + (None, a, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10)))], (4,4--4,10), { ParenRange = (4,3--4,11) }), None, (4,2--4,11)), None, Const (Int32 2, (4,15--4,16)), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index 266a0fdc377..6e4de75436f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -11,10 +11,10 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (a, Some (4,6--4,7), Some (4,4--4,9), + (None, a, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (c, Some (4,15--4,16), Some (4,13--4,18), + (None, c, Some (4,15--4,16), Some (4,13--4,18), Wild (4,17--4,18), None)], (4,4--4,19), { ParenRange = (4,3--4,19) }), None, (4,2--4,19)), None, Const (Int32 2, (4,23--4,24)), (4,2--4,24), Yes, diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl index 70e88ada32d..71e71422227 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl @@ -11,17 +11,17 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (a, Some (4,6--4,7), Some (4,4--4,9), + (None, a, Some (4,6--4,7), Some (4,4--4,9), Named (SynIdent (a, None), false, None, (4,8--4,9)), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (b, Some (4,13--4,14), Some (4,11--4,16), + (None, b, Some (4,13--4,14), Some (4,11--4,16), Named (SynIdent (b, None), false, None, (4,15--4,16)), Some ((4,16--4,17), Some (4,17))); NamePatPairField - (c, Some (4,20--4,21), Some (4,18--4,23), + (None, c, Some (4,20--4,21), Some (4,18--4,23), Named (SynIdent (c, None), false, None, (4,22--4,23)), None)], (4,4--4,24), { ParenRange = (4,3--4,24) }), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs new file mode 100644 index 00000000000..ab7674cee35 --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs @@ -0,0 +1,4 @@ +module Module + +match { A = 1 } with +| { Foo.Bar.A = 1; B = 2; C = 3 } -> () diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl new file mode 100644 index 00000000000..63575e7ee35 --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl @@ -0,0 +1,37 @@ +ImplFile + (ParsedImplFileInput + ("/root/Pattern/Named field 07.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Match + (Yes (3,0--3,20), + Record + (None, None, + [SynExprRecordField + ((SynLongIdent ([A], [], [None]), true), + Some (3,10--3,11), Some (Const (Int32 1, (3,12--3,13))), + (3,8--3,13), None)], (3,6--3,15)), + [SynMatchClause + (Record + ([NamePatPairField + (Some [Foo; Bar], A, Some (4,14--4,15), + Some (4,12--4,17), Const (Int32 1, (4,16--4,17)), + Some ((4,17--4,18), Some (4,18))); + NamePatPairField + (None, B, Some (4,21--4,22), Some (4,19--4,24), + Const (Int32 2, (4,23--4,24)), + Some ((4,24--4,25), Some (4,25))); + NamePatPairField + (None, C, Some (4,28--4,29), Some (4,26--4,31), + Const (Int32 3, (4,30--4,31)), None)], (4,2--4,33)), + None, Const (Unit, (4,37--4,39)), (4,2--4,39), Yes, + { ArrowRange = Some (4,34--4,36) + BarRange = Some (4,0--4,1) })], (3,0--4,39), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,16--3,20) }), (3,0--4,39))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,39), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl index f68e576ecec..12fd6ebf6ea 100644 --- a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl @@ -12,7 +12,7 @@ ImplFile (SynLongIdent ([OnePartData], [], [None]), None, None, NamePatPairs ([NamePatPairField - (part1, Some (4,10--4,11), Some (4,4--4,14), + (None, part1, Some (4,10--4,11), Some (4,4--4,14), Named (SynIdent (p1, None), false, None, (4,12--4,14)), None)], (4,4--5,13), diff --git a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl index d7681f2848a..4f5fd025708 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl @@ -9,8 +9,8 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (A, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), - None)], (4,2--4,11)), None, + (None, A, Some (4,6--4,7), Some (4,4--4,9), + Wild (4,8--4,9), None)], (4,2--4,11)), None, Const (Unit, (4,15--4,17)), (4,2--4,17), Yes, { ArrowRange = Some (4,12--4,14) BarRange = Some (4,0--4,1) })], (3,0--4,17), diff --git a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl index 3b3dc80e310..a45454365d7 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl @@ -9,10 +9,10 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (A, Some (4,6--4,7), Some (4,4--4,9), Wild (4,8--4,9), - Some ((4,9--4,10), Some (4,10))); + (None, A, Some (4,6--4,7), Some (4,4--4,9), + Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (B, Some (4,13--4,14), Some (4,11--4,16), + (None, B, Some (4,13--4,14), Some (4,11--4,16), Wild (4,15--4,16), None)], (4,2--4,18)), None, Const (Unit, (4,22--4,24)), (4,2--4,24), Yes, { ArrowRange = Some (4,19--4,21) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl index bf35cd4b369..fa836ca5892 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl @@ -9,7 +9,7 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (A, Some (4,6--4,7), Some (4,4--4,7), + (None, A, Some (4,6--4,7), Some (4,4--4,7), FromParseError (Wild (4,7--4,7), (4,7--4,7)), None)], (4,2--4,9)), None, Const (Unit, (4,13--4,15)), (4,2--4,15), Yes, { ArrowRange = Some (4,10--4,12) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl index c705cb79483..6a1e848ac8a 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl @@ -9,7 +9,7 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (A, None, Some (4,4--4,5), + (None, A, None, Some (4,4--4,5), FromParseError (Wild (4,5--4,5), (4,5--4,5)), None)], (4,2--4,7)), None, Const (Unit, (4,11--4,13)), (4,2--4,13), Yes, { ArrowRange = Some (4,8--4,10) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl index b335169a274..d4b092ad2cf 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl @@ -9,15 +9,15 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (A, Some (4,6--4,7), Some (4,4--4,9), + (None, A, Some (4,6--4,7), Some (4,4--4,9), Const (Int32 1, (4,8--4,9)), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (B, Some (4,13--4,14), Some (4,11--4,16), + (None, B, Some (4,13--4,14), Some (4,11--4,16), Const (Int32 2, (4,15--4,16)), Some ((4,16--4,17), Some (4,17))); NamePatPairField - (C, Some (4,20--4,21), Some (4,18--4,23), + (None, C, Some (4,20--4,21), Some (4,18--4,23), Const (Int32 3, (4,22--4,23)), None)], (4,2--4,25)), None, Const (Unit, (4,29--4,31)), (4,2--4,31), Yes, { ArrowRange = Some (4,26--4,28) diff --git a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl index affc56dc2e8..330180f06f9 100644 --- a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl @@ -15,7 +15,7 @@ ImplFile (SynLongIdent ([X], [], [None]), None, None, NamePatPairs ([NamePatPairField - (Y, Some (3,7--3,8), Some (3,4--3,10), + (None, Y, Some (3,7--3,8), Some (3,4--3,10), Named (SynIdent (y, None), false, None, (3,9--3,10)), None)], (3,4--3,11), { ParenRange = (3,3--3,11) }), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl index a59452e983b..68a117bc012 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl @@ -20,7 +20,7 @@ ImplFile (Typed (Record ([NamePatPairField - (Name, Some (3,17--3,18), + (None, Name, Some (3,17--3,18), Some (3,12--3,23), Named (SynIdent (name, None), false, None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl index 6f7153181b5..825ed48160c 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl @@ -19,7 +19,8 @@ ImplFile Typed (Record ([NamePatPairField - (Name, Some (3,16--3,17), Some (3,11--3,22), + (None, Name, Some (3,16--3,17), + Some (3,11--3,22), Named (SynIdent (name, None), false, None, (3,18--3,22)), None)], (3,9--3,24)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl index 2eac8949246..3cad3c86b1b 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl @@ -21,14 +21,14 @@ ImplFile (Typed (Record ([NamePatPairField - (Name, Some (4,17--4,18), + (None, Name, Some (4,17--4,18), Some (4,12--4,23), Named (SynIdent (name, None), false, None, (4,19--4,23)), Some ((4,23--4,24), Some (4,24))); NamePatPairField - (Age, Some (4,29--4,30), + (None, Age, Some (4,29--4,30), Some (4,25--4,34), Named (SynIdent (age, None), false, None, @@ -52,7 +52,8 @@ ImplFile (Typed (Record ([NamePatPairField - (Id, Some (5,15--5,16), Some (5,12--5,19), + (None, Id, Some (5,15--5,16), + Some (5,12--5,19), Named (SynIdent (id, None), false, None, (5,17--5,19)), None)], (5,10--5,21)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl index 1a0c14940ba..d845d76a9c6 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl @@ -20,13 +20,15 @@ ImplFile Typed (Record ([NamePatPairField - (Name, Some (4,16--4,17), Some (4,11--4,22), + (None, Name, Some (4,16--4,17), + Some (4,11--4,22), Named (SynIdent (name, None), false, None, (4,18--4,22)), Some ((4,22--4,23), Some (4,23))); NamePatPairField - (Age, Some (4,28--4,29), Some (4,24--4,33), + (None, Age, Some (4,28--4,29), + Some (4,24--4,33), Named (SynIdent (age, None), false, None, (4,30--4,33)), None)], (4,9--4,35)), @@ -48,7 +50,8 @@ ImplFile Typed (Record ([NamePatPairField - (Id, Some (5,14--5,15), Some (5,11--5,18), + (None, Id, Some (5,14--5,15), + Some (5,11--5,18), Named (SynIdent (id, None), false, None, (5,16--5,18)), None)], (5,9--5,20)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl index f5e6bddb5ad..09fb68b04d0 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl @@ -21,14 +21,14 @@ ImplFile (Typed (Record ([NamePatPairField - (Name, Some (4,17--4,18), + (None, Name, Some (4,17--4,18), Some (4,12--4,23), Named (SynIdent (name, None), false, None, (4,19--4,23)), Some ((4,23--4,24), Some (4,24))); NamePatPairField - (Age, Some (4,29--4,30), + (None, Age, Some (4,29--4,30), Some (4,25--4,34), Named (SynIdent (age, None), false, None, @@ -51,7 +51,8 @@ ImplFile Typed (Record ([NamePatPairField - (Id, Some (5,14--5,15), Some (5,11--5,18), + (None, Id, Some (5,14--5,15), + Some (5,11--5,18), Named (SynIdent (id, None), false, None, (5,16--5,18)), None)], (5,9--5,20)), From 89fdc292ce0a5f896f94df880f845c4c12fd7628 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 20 Aug 2025 22:18:13 +0100 Subject: [PATCH 23/32] ilverify --- ..._FSharp.Compiler.Service_Debug_net10.0.bsl | 32 ++++++++--------- ....Compiler.Service_Debug_netstandard2.0.bsl | 34 +++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl index 271af301d70..9bfdb8bbc1e 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl @@ -15,20 +15,20 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -42,13 +42,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -58,15 +58,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4445::Invoke([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+RowKind)][offset 0x00000128][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 1df923d6ba4..f46e5ae82fa 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -15,18 +15,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x0000008A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000026] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000069][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. @@ -35,12 +28,19 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1435-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. @@ -59,7 +59,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000033][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000063][found Char] Unexpected type on the stack. @@ -67,8 +67,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -83,15 +83,15 @@ [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. From 32a1101518c5d39284a5eb816349246451d201c4 Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Thu, 21 Aug 2025 11:32:15 +0100 Subject: [PATCH 24/32] Update ServiceParseWalk.fs --- src/Compiler/Service/ServiceParseTreeWalk.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index ae7601816bc..133df625a8a 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -772,7 +772,7 @@ module SyntaxTraversal = | SynPat.Ands(ps, _) | SynPat.Tuple(elementPats = ps) | SynPat.ArrayOrList(_, ps, _) -> ps |> List.tryPick (traversePat path) - | SynPat.Record(fieldPats = fieldPats) -> fieldPats |> List.map _.Pattern |> List.tryPick (traversePat path) + | SynPat.Record(fieldPats = fieldPats) -> fieldPats |> List.tryPick (fun x -> traversePat path x.Pattern) | SynPat.Attrib(p, attributes, m) -> match traversePat path p with | None -> attributeApplicationDives path attributes |> pick m attributes @@ -780,7 +780,7 @@ module SyntaxTraversal = | SynPat.LongIdent(argPats = args) -> match args with | SynArgPats.Pats ps -> ps |> List.tryPick (traversePat path) - | SynArgPats.NamePatPairs(pats = ps) -> ps |> List.map _.Pattern |> List.tryPick (traversePat path) + | SynArgPats.NamePatPairs(pats = ps) -> ps |> List.tryPick (fun x -> traversePat path x.Pattern) | SynPat.Typed(p, ty, _) -> match traversePat path p with | None -> traverseSynType path ty From 532955c1f16c5c6a3509da1d6a374ce616e19ec1 Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Thu, 21 Aug 2025 22:24:39 +0100 Subject: [PATCH 25/32] fix completion test --- .../tests/FSharp.Editor.Tests/CompletionProviderTests.fs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vsintegration/tests/FSharp.Editor.Tests/CompletionProviderTests.fs b/vsintegration/tests/FSharp.Editor.Tests/CompletionProviderTests.fs index 4377253d1ad..942701b37b9 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/CompletionProviderTests.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/CompletionProviderTests.fs @@ -2090,10 +2090,10 @@ match { A = 1; B = 2 } with VerifyCompletionList(fileContents, "| { A = 1; ", [ "B"; "R1"; "R2" ], [ "C"; "D" ]) VerifyCompletionList(fileContents, "| { A = 2; s", [ "B"; "R1"; "R2" ], [ "C"; "D" ]) - VerifyCompletionList(fileContents, "| { B =", [ "R1"; "R2"; "Some"; "None"; "System"; "DU" ], [ "A"; "B"; "C"; "D" ]) - VerifyCompletionList(fileContents, "| { B = ", [ "R1"; "R2"; "Some"; "None"; "System"; "DU" ], [ "A"; "B"; "C"; "D" ]) - VerifyCompletionList(fileContents, "| { X =", [ "R1"; "R2"; "Some"; "None"; "System"; "DU" ], [ "A"; "B"; "C"; "D" ]) - VerifyCompletionList(fileContents, "| { X = ", [ "R1"; "R2"; "Some"; "None"; "System"; "DU" ], [ "A"; "B"; "C"; "D" ]) + VerifyCompletionList(fileContents, "| { B =", [ "R1"; "R2"; "System" ], [ "B"; "C"; "D" ]) + VerifyCompletionList(fileContents, "| { B = ", [ "R1"; "R2"; "System" ], [ "B"; "C"; "D" ]) + VerifyCompletionList(fileContents, "| { X =", [ "R1"; "R2"; "System" ], [ "B"; "C"; "D" ]) + VerifyCompletionList(fileContents, "| { X = ", [ "R1"; "R2"; "System" ], [ "B"; "C"; "D" ]) // Ideally C and D should not be present here, but right now we're not able to filter fields in an empty record pattern stub VerifyCompletionList(fileContents, "| { ", [ "A"; "B"; "C"; "D"; "R1"; "R2" ], []) From 6d94ade583d4c024590f8117303715984aed178b Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Fri, 22 Aug 2025 16:12:50 +0100 Subject: [PATCH 26/32] Try using SynLongIdent --- src/Compiler/Checking/CheckPatterns.fs | 17 ++++---- src/Compiler/Service/ServiceParsedInputOps.fs | 28 +++++++++---- src/Compiler/SyntaxTree/SyntaxTree.fs | 7 +--- src/Compiler/SyntaxTree/SyntaxTree.fsi | 9 +---- src/Compiler/pars.fsy | 39 +++++++++---------- ...ervice.SurfaceArea.netstandard20.debug.bsl | 14 +++---- ...vice.SurfaceArea.netstandard20.release.bsl | 14 +++---- ....Compiler.Service_Debug_netstandard2.0.bsl | 2 +- ...ompiler.Service_Release_netstandard2.0.bsl | 2 +- ...ComplexArgumentsLambdaHasArrowRange.fs.bsl | 9 +++-- .../DestructedLambdaHasArrowRange.fs.bsl | 9 +++-- .../SyntaxTree/Pattern/Named field 01.fs.bsl | 21 +++++----- .../SyntaxTree/Pattern/Named field 02.fs.bsl | 8 ++-- .../SyntaxTree/Pattern/Named field 03.fs.bsl | 8 ++-- .../SyntaxTree/Pattern/Named field 04.fs.bsl | 17 ++++---- .../SyntaxTree/Pattern/Named field 05.fs.bsl | 21 +++++----- .../SyntaxTree/Pattern/Named field 06.fs.bsl | 9 +++-- .../SyntaxTree/Pattern/Named field 07.fs.bsl | 17 ++++---- ...ParenthesesOfSynArgPatsNamePatPairs.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 01.fs.bsl | 14 +++---- .../data/SyntaxTree/Pattern/Record 02.fs.bsl | 19 ++++----- .../data/SyntaxTree/Pattern/Record 03.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 04.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 07.fs.bsl | 15 +++---- ...airsContainsTheRangeOfTheEqualsSign.fs.bsl | 3 +- .../SynType/Typed LetBang 07.fs.bsl | 4 +- .../SynType/Typed LetBang 08.fs.bsl | 4 +- .../SynType/Typed LetBang AndBang 03.fs.bsl | 12 +++--- .../SynType/Typed LetBang AndBang 04.fs.bsl | 12 +++--- .../SynType/Typed LetBang AndBang 05.fs.bsl | 12 +++--- 30 files changed, 187 insertions(+), 168 deletions(-) diff --git a/src/Compiler/Checking/CheckPatterns.fs b/src/Compiler/Checking/CheckPatterns.fs index 4eee41e5393..b7ad664fc6f 100644 --- a/src/Compiler/Checking/CheckPatterns.fs +++ b/src/Compiler/Checking/CheckPatterns.fs @@ -459,12 +459,11 @@ and TcPatArrayOrList warnOnUpper cenv env vFlags patEnv ty isArray args m = and TcRecordPat warnOnUpper (cenv: cenv) env vFlags patEnv ty fieldPats m = let fieldPats = fieldPats - |> List.map (fun (field: NamePatPairField) -> - let fieldId = - match field.FieldPath with - | Some path -> (path, field.FieldName) - | None -> ([], field.FieldName) - fieldId, field.Pattern) + |> List.map (fun (NamePatPairField(fieldName = fieldLid; pat = pat)) -> + match fieldLid.LongIdent with + | [id] -> ([], id), pat + | lid -> List.frontAndBack lid, pat) + match BuildFieldMap cenv env false ty fieldPats m with | None -> (fun _ -> TPat_error m), patEnv | Some(tinst, tcref, fldsmap, _fldsList) -> @@ -666,7 +665,11 @@ and TcPatLongIdentUnionCaseOrExnCase warnOnUpper cenv env ad vFlags patEnv ty (m let result = Array.zeroCreate numArgTys let extraPatterns = List () - for NamePatPairField(fieldName = id; pat = pat) in pairs do + for NamePatPairField(fieldName = fieldLid; pat = pat) in pairs do + let id = + match fieldLid.LongIdent with + | [id] -> id + | lid -> snd (List.frontAndBack lid) match argNames |> List.tryFindIndex (fun id2 -> id.idText = id2.Id.idText) with | None -> extraPatterns.Add pat diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 6dbc2e8433c..583c7c0f992 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -1120,6 +1120,8 @@ module ParsedInput = let last = List.last lid.LongIdent last.idRange.End + let lastIdentOfSynLongIdent (lid: SynLongIdent) = List.last lid.LongIdent + let endOfClosingTokenOrLastIdent (mClosing: range option) (lid: SynLongIdent) = match mClosing with | Some m -> m.End @@ -1294,19 +1296,23 @@ module ParsedInput = -> pats |> List.tryPick (fun field -> - if rangeContainsPos field.FieldName.idRange pos then - let referencedFields = pats |> List.map _.FieldName.idText + if rangeContainsPos field.FieldName.Range pos then + let referencedFields = + pats |> List.map (fun f -> (lastIdentOfSynLongIdent f.FieldName).idText) + Some(CompletionContext.Pattern(PatternContext.UnionCaseFieldIdentifier(referencedFields, caseId.Range))) else - let context = - Some(PatternContext.NamedUnionCaseField(field.FieldName.idText, caseId.Range)) + let lastId = lastIdentOfSynLongIdent field.FieldName + let context = Some(PatternContext.NamedUnionCaseField(lastId.idText, caseId.Range)) TryGetCompletionContextInPattern suppressIdentifierCompletions field.Pattern context pos) |> Option.orElseWith (fun () -> // Last resort - check for fun (Case (item1 = a; | )) -> // That is, pos is after the last pair and still within parentheses if rangeBeforePos mPairs pos then - let referencedFields = pats |> List.map _.FieldName.idText + let referencedFields = + pats |> List.map (fun f -> (lastIdentOfSynLongIdent f.FieldName).idText) + Some(CompletionContext.Pattern(PatternContext.UnionCaseFieldIdentifier(referencedFields, caseId.Range))) else None) @@ -1341,9 +1347,12 @@ module ParsedInput = let fieldId = f.FieldName let pat = f.Pattern - if rangeContainsPos fieldId.idRange pos then + if rangeContainsPos fieldId.Range pos then let referencedFields = - pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) + pats + |> List.map (fun f -> + let lastId = lastIdentOfSynLongIdent f.FieldName + lastId.idText, lastId.idRange) Some(CompletionContext.Pattern(PatternContext.RecordFieldIdentifier referencedFields)) elif rangeContainsPos pat.Range pos then @@ -1366,7 +1375,10 @@ module ParsedInput = | _ -> false) then let referencedFields = - pats |> List.map (fun f -> f.FieldName.idText, f.FieldName.idRange) + pats + |> List.map (fun f -> + let lastId = lastIdentOfSynLongIdent f.FieldName + lastId.idText, lastId.idRange) Some(CompletionContext.Pattern(PatternContext.RecordFieldIdentifier referencedFields)) else diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index ba2c4d4f3cb..d5f4d5fbe99 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -923,17 +923,12 @@ type SynSimplePats = [] type NamePatPairField = | NamePatPairField of - fieldPath: Ident list option * - fieldName: Ident * + fieldName: SynLongIdent * equalsRange: range option * range: range option * pat: SynPat * blockSeparator: BlockSeparator option - member this.FieldPath = - match this with - | NamePatPairField(fieldPath = p) -> p - member this.FieldName = match this with | NamePatPairField(fieldName = n) -> n diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 4987aea3c3b..db8df85956c 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1050,10 +1050,8 @@ type SynSimplePats = [] type NamePatPairField = | NamePatPairField of - /// The full path to the field (for record patterns), if any. - fieldPath: Ident list option * /// The identifier of the named field/parameter. - fieldName: Ident * + fieldName: SynLongIdent * /// The range of the equals sign in `name = pattern`, if present. equalsRange: range option * /// The overall range of this name–pattern pair. @@ -1063,11 +1061,8 @@ type NamePatPairField = /// The separator trivia that follows this pair (e.g., semicolon or block separator), if any. blockSeparator: BlockSeparator option - /// Gets the full path to the field, if available. - member FieldPath: Ident list option - /// Gets the identifier of the named field/parameter. - member FieldName: Ident + member FieldName: SynLongIdent /// Gets the overall range of this name–pattern pair, if available. member Range: range option diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index aedc9f2589a..2804c9af5b3 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3658,18 +3658,21 @@ namePatPairs: | namePatPair opt_seps_block { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - [ NamePatPairField(None, id, mEq, Some m, pat, $2) ] } + let lid = SynLongIdent([id], [], [None]) + [ NamePatPairField(lid, mEq, Some m, pat, $2) ] } | namePatPair seps_block namePatPairs { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - NamePatPairField(None, id, mEq, Some m, pat, Some $2) :: $3 } + let lid = SynLongIdent([id], [], [None]) + NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $3 } | namePatPair seps_block seps_block namePatPairs { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range - NamePatPairField(None, id, mEq, Some m, pat, Some $2) :: $4 } + let lid = SynLongIdent([id], [], [None]) + NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $4 } namePatPair: | ident EQUALS parenPattern @@ -4003,38 +4006,32 @@ conjParenPatternElements: recordPatternElementsAux: | recordPatternElement opt_seps_block - { let fullPath, (id: Ident), mEq, (pat: SynPat) = $1 - let m = unionRanges id.idRange pat.Range - [ NamePatPairField(fullPath, id, mEq, Some m, pat, $2) ] } + { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 + let m = unionRanges lid.Range pat.Range + [ NamePatPairField(lid, mEq, Some m, pat, $2) ] } | recordPatternElement seps_block recordPatternElementsAux - { let fullPath, (id: Ident), mEq, (pat: SynPat) = $1 - let m = unionRanges id.idRange pat.Range - NamePatPairField(fullPath, id, mEq, Some m, pat, Some $2) :: $3 } + { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 + let m = unionRanges lid.Range pat.Range + NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $3 } | recordPatternElement seps_block seps_block recordPatternElementsAux { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) - let fullPath, (id: Ident), mEq, (pat: SynPat) = $1 - let m = unionRanges id.idRange pat.Range - NamePatPairField(fullPath, id, mEq, Some m, pat, Some $2) :: $4 } + let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 + let m = unionRanges lid.Range pat.Range + NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $4 } recordPatternElement: | path EQUALS parenPattern { let mEquals = rhs parseState 2 - let path, id = List.frontAndBack $1.LongIdent - let fullPath = if List.isEmpty path then None else Some path - fullPath, id, Some mEquals, $3 } + $1, Some mEquals, $3 } | path EQUALS recover { let mEquals = rhs parseState 2 - let path, id = List.frontAndBack $1.LongIdent - let fullPath = if List.isEmpty path then None else Some path - fullPath, id, Some mEquals, patFromParseError (SynPat.Wild mEquals.EndRange) } + $1, Some mEquals, patFromParseError (SynPat.Wild mEquals.EndRange) } | path recover - { let path, id = List.frontAndBack $1.LongIdent - let fullPath = if List.isEmpty path then None else Some path - fullPath, id, None, patFromParseError (SynPat.Wild $1.Range.EndRange) } + { $1, None, patFromParseError (SynPat.Wild $1.Range.EndRange) } listPatternElements: | /* EMPTY */ diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index 529f756feab..f03f4f3338a 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -6158,11 +6158,11 @@ FSharp.Compiler.Syntax.Ident: System.String ToString() FSharp.Compiler.Syntax.Ident: System.String get_idText() FSharp.Compiler.Syntax.Ident: System.String idText FSharp.Compiler.Syntax.Ident: Void .ctor(System.String, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident FieldName -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident fieldName -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_FieldName() -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_fieldName() -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]], FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent FieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent fieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent get_FieldName() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent get_fieldName() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() @@ -6175,10 +6175,6 @@ FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FS FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] FieldPath -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] fieldPath -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_FieldPath() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_fieldPath() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index 529f756feab..f03f4f3338a 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -6158,11 +6158,11 @@ FSharp.Compiler.Syntax.Ident: System.String ToString() FSharp.Compiler.Syntax.Ident: System.String get_idText() FSharp.Compiler.Syntax.Ident: System.String idText FSharp.Compiler.Syntax.Ident: Void .ctor(System.String, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident FieldName -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident fieldName -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_FieldName() -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.Ident get_fieldName() -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]], FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent FieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent fieldName +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent get_FieldName() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent get_fieldName() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() @@ -6175,10 +6175,6 @@ FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FS FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] FieldPath -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] fieldPath -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_FieldPath() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident]] get_fieldPath() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index f46e5ae82fa..ab33520cdd6 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -34,7 +34,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1435-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1447-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 90af427aaf9..bafc2e6842c 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -33,7 +33,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1435-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1447-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. diff --git a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl index c4a8ef0d5c1..c4278fec485 100644 --- a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl @@ -26,7 +26,8 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, Y, Some (3,9--3,10), Some (3,7--3,15), + (SynLongIdent ([Y], [], [None]), + Some (3,9--3,10), Some (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, @@ -90,7 +91,8 @@ ImplFile Paren (Record ([NamePatPairField - (None, Y, Some (3,9--3,10), Some (3,7--3,15), + (SynLongIdent ([Y], [], [None]), Some (3,9--3,10), + Some (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, @@ -112,7 +114,8 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, Y, Some (3,9--3,10), Some (3,7--3,15), + (SynLongIdent ([Y], [], [None]), + Some (3,9--3,10), Some (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, diff --git a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl index 1c068c374f7..3fbaecfe39d 100644 --- a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl @@ -15,7 +15,8 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, X, Some (2,8--2,9), Some (2,6--2,11), + (SynLongIdent ([X], [], [None]), Some (2,8--2,9), + Some (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13)), None, @@ -37,7 +38,8 @@ ImplFile Some ([Record ([NamePatPairField - (None, X, Some (2,8--2,9), Some (2,6--2,11), + (SynLongIdent ([X], [], [None]), Some (2,8--2,9), + Some (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13))], @@ -46,7 +48,8 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, X, Some (2,8--2,9), Some (2,6--2,11), + (SynLongIdent ([X], [], [None]), + Some (2,8--2,9), Some (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13)), None, diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl index dce7d20ca35..ef550849a11 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl @@ -11,17 +11,18 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, a, Some (4,6--4,7), Some (4,4--4,9), - Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + (SynLongIdent ([a], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Wild (4,8--4,9), + Some ((4,9--4,10), Some (4,10))); NamePatPairField - (None, b, Some (4,13--4,14), Some (4,11--4,16), - Wild (4,15--4,16), None)], (4,4--4,17), - { ParenRange = (4,3--4,17) }), None, (4,2--4,17)), - None, Const (Int32 2, (4,21--4,22)), (4,2--4,22), Yes, - { ArrowRange = Some (4,18--4,20) - BarRange = Some (4,0--4,1) })], (3,0--4,22), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,8--3,12) }), (3,0--4,22))], + (SynLongIdent ([b], [], [None]), Some (4,13--4,14), + Some (4,11--4,16), Wild (4,15--4,16), None)], + (4,4--4,17), { ParenRange = (4,3--4,17) }), None, + (4,2--4,17)), None, Const (Int32 2, (4,21--4,22)), + (4,2--4,22), Yes, { ArrowRange = Some (4,18--4,20) + BarRange = Some (4,0--4,1) })], + (3,0--4,22), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,22))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,22), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl index dac59a0fdd4..d89f3e28ff2 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl @@ -11,10 +11,12 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, a, Some (4,6--4,7), Some (4,4--4,9), - Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + (SynLongIdent ([a], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Wild (4,8--4,9), + Some ((4,9--4,10), Some (4,10))); NamePatPairField - (None, b, Some (4,13--4,14), Some (4,11--4,14), + (SynLongIdent ([b], [], [None]), Some (4,13--4,14), + Some (4,11--4,14), FromParseError (Wild (4,14--4,14), (4,14--4,14)), None)], (4,4--4,16), { ParenRange = (4,3--4,16) }), None, (4,2--4,16)), None, Const (Int32 2, (4,20--4,21)), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index b83a4d09960..7e21a510df9 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -11,10 +11,12 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, a, Some (4,6--4,7), Some (4,4--4,9), - Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + (SynLongIdent ([a], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Wild (4,8--4,9), + Some ((4,9--4,10), Some (4,10))); NamePatPairField - (None, b, None, Some (4,11--4,12), + (SynLongIdent ([b], [], [None]), None, + Some (4,11--4,12), FromParseError (Wild (4,12--4,12), (4,12--4,12)), None)], (4,4--4,13), { ParenRange = (4,3--4,13) }), None, (4,2--4,13)), None, Const (Int32 2, (4,17--4,18)), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl index 6f417f1422f..458a5b1827f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl @@ -11,14 +11,15 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, a, Some (4,6--4,7), Some (4,4--4,9), - Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10)))], - (4,4--4,10), { ParenRange = (4,3--4,11) }), None, - (4,2--4,11)), None, Const (Int32 2, (4,15--4,16)), - (4,2--4,16), Yes, { ArrowRange = Some (4,12--4,14) - BarRange = Some (4,0--4,1) })], - (3,0--4,16), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,8--3,12) }), (3,0--4,16))], + (SynLongIdent ([a], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Wild (4,8--4,9), + Some ((4,9--4,10), Some (4,10)))], (4,4--4,10), + { ParenRange = (4,3--4,11) }), None, (4,2--4,11)), + None, Const (Int32 2, (4,15--4,16)), (4,2--4,16), Yes, + { ArrowRange = Some (4,12--4,14) + BarRange = Some (4,0--4,1) })], (3,0--4,16), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,16))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index 6e4de75436f..db8231fe243 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -11,17 +11,18 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, a, Some (4,6--4,7), Some (4,4--4,9), - Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + (SynLongIdent ([a], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Wild (4,8--4,9), + Some ((4,9--4,10), Some (4,10))); NamePatPairField - (None, c, Some (4,15--4,16), Some (4,13--4,18), - Wild (4,17--4,18), None)], (4,4--4,19), - { ParenRange = (4,3--4,19) }), None, (4,2--4,19)), - None, Const (Int32 2, (4,23--4,24)), (4,2--4,24), Yes, - { ArrowRange = Some (4,20--4,22) - BarRange = Some (4,0--4,1) })], (3,0--4,24), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,8--3,12) }), (3,0--4,24))], + (SynLongIdent ([c], [], [None]), Some (4,15--4,16), + Some (4,13--4,18), Wild (4,17--4,18), None)], + (4,4--4,19), { ParenRange = (4,3--4,19) }), None, + (4,2--4,19)), None, Const (Int32 2, (4,23--4,24)), + (4,2--4,24), Yes, { ArrowRange = Some (4,20--4,22) + BarRange = Some (4,0--4,1) })], + (3,0--4,24), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,24))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl index 71e71422227..733ac88b5a9 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl @@ -11,17 +11,20 @@ ImplFile (SynLongIdent ([A], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, a, Some (4,6--4,7), Some (4,4--4,9), + (SynLongIdent ([a], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Named (SynIdent (a, None), false, None, (4,8--4,9)), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (None, b, Some (4,13--4,14), Some (4,11--4,16), + (SynLongIdent ([b], [], [None]), Some (4,13--4,14), + Some (4,11--4,16), Named (SynIdent (b, None), false, None, (4,15--4,16)), Some ((4,16--4,17), Some (4,17))); NamePatPairField - (None, c, Some (4,20--4,21), Some (4,18--4,23), + (SynLongIdent ([c], [], [None]), Some (4,20--4,21), + Some (4,18--4,23), Named (SynIdent (c, None), false, None, (4,22--4,23)), None)], (4,4--4,24), { ParenRange = (4,3--4,24) }), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl index 63575e7ee35..4247da84d41 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl @@ -15,17 +15,20 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (Some [Foo; Bar], A, Some (4,14--4,15), - Some (4,12--4,17), Const (Int32 1, (4,16--4,17)), + (SynLongIdent + ([Foo; Bar; A], [(4,7--4,8); (4,11--4,12)], + [None; None; None]), Some (4,14--4,15), + Some (4,4--4,17), Const (Int32 1, (4,16--4,17)), Some ((4,17--4,18), Some (4,18))); NamePatPairField - (None, B, Some (4,21--4,22), Some (4,19--4,24), - Const (Int32 2, (4,23--4,24)), + (SynLongIdent ([B], [], [None]), Some (4,21--4,22), + Some (4,19--4,24), Const (Int32 2, (4,23--4,24)), Some ((4,24--4,25), Some (4,25))); NamePatPairField - (None, C, Some (4,28--4,29), Some (4,26--4,31), - Const (Int32 3, (4,30--4,31)), None)], (4,2--4,33)), - None, Const (Unit, (4,37--4,39)), (4,2--4,39), Yes, + (SynLongIdent ([C], [], [None]), Some (4,28--4,29), + Some (4,26--4,31), Const (Int32 3, (4,30--4,31)), + None)], (4,2--4,33)), None, + Const (Unit, (4,37--4,39)), (4,2--4,39), Yes, { ArrowRange = Some (4,34--4,36) BarRange = Some (4,0--4,1) })], (3,0--4,39), { MatchKeyword = (3,0--3,5) diff --git a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl index 12fd6ebf6ea..e1f0d8f98d6 100644 --- a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl @@ -12,7 +12,8 @@ ImplFile (SynLongIdent ([OnePartData], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, part1, Some (4,10--4,11), Some (4,4--4,14), + (SynLongIdent ([part1], [], [None]), + Some (4,10--4,11), Some (4,4--4,14), Named (SynIdent (p1, None), false, None, (4,12--4,14)), None)], (4,4--5,13), diff --git a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl index 4f5fd025708..5aa0b81ac9b 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl @@ -9,13 +9,13 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, A, Some (4,6--4,7), Some (4,4--4,9), - Wild (4,8--4,9), None)], (4,2--4,11)), None, - Const (Unit, (4,15--4,17)), (4,2--4,17), Yes, - { ArrowRange = Some (4,12--4,14) - BarRange = Some (4,0--4,1) })], (3,0--4,17), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,17))], + (SynLongIdent ([A], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Wild (4,8--4,9), None)], + (4,2--4,11)), None, Const (Unit, (4,15--4,17)), + (4,2--4,17), Yes, { ArrowRange = Some (4,12--4,14) + BarRange = Some (4,0--4,1) })], + (3,0--4,17), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,17))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl index a45454365d7..f18d255af01 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl @@ -9,16 +9,17 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, A, Some (4,6--4,7), Some (4,4--4,9), - Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); + (SynLongIdent ([A], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Wild (4,8--4,9), + Some ((4,9--4,10), Some (4,10))); NamePatPairField - (None, B, Some (4,13--4,14), Some (4,11--4,16), - Wild (4,15--4,16), None)], (4,2--4,18)), None, - Const (Unit, (4,22--4,24)), (4,2--4,24), Yes, - { ArrowRange = Some (4,19--4,21) - BarRange = Some (4,0--4,1) })], (3,0--4,24), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,24))], + (SynLongIdent ([B], [], [None]), Some (4,13--4,14), + Some (4,11--4,16), Wild (4,15--4,16), None)], + (4,2--4,18)), None, Const (Unit, (4,22--4,24)), + (4,2--4,24), Yes, { ArrowRange = Some (4,19--4,21) + BarRange = Some (4,0--4,1) })], + (3,0--4,24), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,24))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl index fa836ca5892..fd73818cd81 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl @@ -9,7 +9,8 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, A, Some (4,6--4,7), Some (4,4--4,7), + (SynLongIdent ([A], [], [None]), Some (4,6--4,7), + Some (4,4--4,7), FromParseError (Wild (4,7--4,7), (4,7--4,7)), None)], (4,2--4,9)), None, Const (Unit, (4,13--4,15)), (4,2--4,15), Yes, { ArrowRange = Some (4,10--4,12) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl index 6a1e848ac8a..fed95dd4c68 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl @@ -9,7 +9,8 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, A, None, Some (4,4--4,5), + (SynLongIdent ([A], [], [None]), None, + Some (4,4--4,5), FromParseError (Wild (4,5--4,5), (4,5--4,5)), None)], (4,2--4,7)), None, Const (Unit, (4,11--4,13)), (4,2--4,13), Yes, { ArrowRange = Some (4,8--4,10) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl index d4b092ad2cf..798815d0efa 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl @@ -9,17 +9,18 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (None, A, Some (4,6--4,7), Some (4,4--4,9), - Const (Int32 1, (4,8--4,9)), + (SynLongIdent ([A], [], [None]), Some (4,6--4,7), + Some (4,4--4,9), Const (Int32 1, (4,8--4,9)), Some ((4,9--4,10), Some (4,10))); NamePatPairField - (None, B, Some (4,13--4,14), Some (4,11--4,16), - Const (Int32 2, (4,15--4,16)), + (SynLongIdent ([B], [], [None]), Some (4,13--4,14), + Some (4,11--4,16), Const (Int32 2, (4,15--4,16)), Some ((4,16--4,17), Some (4,17))); NamePatPairField - (None, C, Some (4,20--4,21), Some (4,18--4,23), - Const (Int32 3, (4,22--4,23)), None)], (4,2--4,25)), - None, Const (Unit, (4,29--4,31)), (4,2--4,31), Yes, + (SynLongIdent ([C], [], [None]), Some (4,20--4,21), + Some (4,18--4,23), Const (Int32 3, (4,22--4,23)), + None)], (4,2--4,25)), None, + Const (Unit, (4,29--4,31)), (4,2--4,31), Yes, { ArrowRange = Some (4,26--4,28) BarRange = Some (4,0--4,1) })], (3,0--4,31), { MatchKeyword = (3,0--3,5) diff --git a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl index 330180f06f9..1f2b1847340 100644 --- a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl @@ -15,7 +15,8 @@ ImplFile (SynLongIdent ([X], [], [None]), None, None, NamePatPairs ([NamePatPairField - (None, Y, Some (3,7--3,8), Some (3,4--3,10), + (SynLongIdent ([Y], [], [None]), Some (3,7--3,8), + Some (3,4--3,10), Named (SynIdent (y, None), false, None, (3,9--3,10)), None)], (3,4--3,11), { ParenRange = (3,3--3,11) }), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl index 68a117bc012..0d0fb244496 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl @@ -20,8 +20,8 @@ ImplFile (Typed (Record ([NamePatPairField - (None, Name, Some (3,17--3,18), - Some (3,12--3,23), + (SynLongIdent ([Name], [], [None]), + Some (3,17--3,18), Some (3,12--3,23), Named (SynIdent (name, None), false, None, (3,19--3,23)), None)], (3,10--3,25)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl index 825ed48160c..db4100a0e4f 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl @@ -19,8 +19,8 @@ ImplFile Typed (Record ([NamePatPairField - (None, Name, Some (3,16--3,17), - Some (3,11--3,22), + (SynLongIdent ([Name], [], [None]), + Some (3,16--3,17), Some (3,11--3,22), Named (SynIdent (name, None), false, None, (3,18--3,22)), None)], (3,9--3,24)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl index 3cad3c86b1b..11c4fbcfa69 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl @@ -21,15 +21,15 @@ ImplFile (Typed (Record ([NamePatPairField - (None, Name, Some (4,17--4,18), - Some (4,12--4,23), + (SynLongIdent ([Name], [], [None]), + Some (4,17--4,18), Some (4,12--4,23), Named (SynIdent (name, None), false, None, (4,19--4,23)), Some ((4,23--4,24), Some (4,24))); NamePatPairField - (None, Age, Some (4,29--4,30), - Some (4,25--4,34), + (SynLongIdent ([Age], [], [None]), + Some (4,29--4,30), Some (4,25--4,34), Named (SynIdent (age, None), false, None, (4,31--4,34)), None)], (4,10--4,36)), @@ -52,8 +52,8 @@ ImplFile (Typed (Record ([NamePatPairField - (None, Id, Some (5,15--5,16), - Some (5,12--5,19), + (SynLongIdent ([Id], [], [None]), + Some (5,15--5,16), Some (5,12--5,19), Named (SynIdent (id, None), false, None, (5,17--5,19)), None)], (5,10--5,21)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl index d845d76a9c6..4f4af581480 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl @@ -20,15 +20,15 @@ ImplFile Typed (Record ([NamePatPairField - (None, Name, Some (4,16--4,17), - Some (4,11--4,22), + (SynLongIdent ([Name], [], [None]), + Some (4,16--4,17), Some (4,11--4,22), Named (SynIdent (name, None), false, None, (4,18--4,22)), Some ((4,22--4,23), Some (4,23))); NamePatPairField - (None, Age, Some (4,28--4,29), - Some (4,24--4,33), + (SynLongIdent ([Age], [], [None]), + Some (4,28--4,29), Some (4,24--4,33), Named (SynIdent (age, None), false, None, (4,30--4,33)), None)], (4,9--4,35)), @@ -50,8 +50,8 @@ ImplFile Typed (Record ([NamePatPairField - (None, Id, Some (5,14--5,15), - Some (5,11--5,18), + (SynLongIdent ([Id], [], [None]), + Some (5,14--5,15), Some (5,11--5,18), Named (SynIdent (id, None), false, None, (5,16--5,18)), None)], (5,9--5,20)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl index 09fb68b04d0..7490bc7e31d 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl @@ -21,15 +21,15 @@ ImplFile (Typed (Record ([NamePatPairField - (None, Name, Some (4,17--4,18), - Some (4,12--4,23), + (SynLongIdent ([Name], [], [None]), + Some (4,17--4,18), Some (4,12--4,23), Named (SynIdent (name, None), false, None, (4,19--4,23)), Some ((4,23--4,24), Some (4,24))); NamePatPairField - (None, Age, Some (4,29--4,30), - Some (4,25--4,34), + (SynLongIdent ([Age], [], [None]), + Some (4,29--4,30), Some (4,25--4,34), Named (SynIdent (age, None), false, None, (4,31--4,34)), None)], (4,10--4,36)), @@ -51,8 +51,8 @@ ImplFile Typed (Record ([NamePatPairField - (None, Id, Some (5,14--5,15), - Some (5,11--5,18), + (SynLongIdent ([Id], [], [None]), + Some (5,14--5,15), Some (5,11--5,18), Named (SynIdent (id, None), false, None, (5,16--5,18)), None)], (5,9--5,20)), From 5e32e955fde661a38629505b61fc40ed10c3391f Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Tue, 26 Aug 2025 10:30:24 +0100 Subject: [PATCH 27/32] NamePatPairField range should not be optional --- src/Compiler/SyntaxTree/SyntaxTree.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTree.fsi | 4 +-- src/Compiler/pars.fsy | 12 +++---- ...ervice.SurfaceArea.netstandard20.debug.bsl | 10 +++--- ...vice.SurfaceArea.netstandard20.release.bsl | 10 +++--- ..._FSharp.Compiler.Service_Debug_net10.0.bsl | 32 ++++++++--------- ....Compiler.Service_Debug_netstandard2.0.bsl | 34 +++++++++---------- ...ComplexArgumentsLambdaHasArrowRange.fs.bsl | 6 ++-- .../DestructedLambdaHasArrowRange.fs.bsl | 6 ++-- .../SyntaxTree/Pattern/Named field 01.fs.bsl | 4 +-- .../SyntaxTree/Pattern/Named field 02.fs.bsl | 4 +-- .../SyntaxTree/Pattern/Named field 03.fs.bsl | 4 +-- .../SyntaxTree/Pattern/Named field 04.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 05.fs.bsl | 4 +-- .../SyntaxTree/Pattern/Named field 06.fs.bsl | 6 ++-- .../SyntaxTree/Pattern/Named field 07.fs.bsl | 17 +++++----- ...ParenthesesOfSynArgPatsNamePatPairs.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 01.fs.bsl | 12 +++---- .../data/SyntaxTree/Pattern/Record 02.fs.bsl | 14 ++++---- .../data/SyntaxTree/Pattern/Record 03.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 04.fs.bsl | 3 +- .../data/SyntaxTree/Pattern/Record 07.fs.bsl | 17 +++++----- ...airsContainsTheRangeOfTheEqualsSign.fs.bsl | 2 +- .../SynType/Typed LetBang 07.fs.bsl | 2 +- .../SynType/Typed LetBang 08.fs.bsl | 2 +- .../SynType/Typed LetBang AndBang 03.fs.bsl | 6 ++-- .../SynType/Typed LetBang AndBang 04.fs.bsl | 6 ++-- .../SynType/Typed LetBang AndBang 05.fs.bsl | 6 ++-- 28 files changed, 114 insertions(+), 117 deletions(-) diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index d5f4d5fbe99..c41e483e27a 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -925,7 +925,7 @@ type NamePatPairField = | NamePatPairField of fieldName: SynLongIdent * equalsRange: range option * - range: range option * + range: range * pat: SynPat * blockSeparator: BlockSeparator option diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index db8df85956c..d35f6786ec0 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1055,7 +1055,7 @@ type NamePatPairField = /// The range of the equals sign in `name = pattern`, if present. equalsRange: range option * /// The overall range of this name–pattern pair. - range: range option * + range: range * /// The pattern associated with the named field. pat: SynPat * /// The separator trivia that follows this pair (e.g., semicolon or block separator), if any. @@ -1065,7 +1065,7 @@ type NamePatPairField = member FieldName: SynLongIdent /// Gets the overall range of this name–pattern pair, if available. - member Range: range option + member Range: range /// Gets the pattern associated with the named field. member Pattern: SynPat diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 2804c9af5b3..2b897036b47 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3659,20 +3659,20 @@ namePatPairs: { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range let lid = SynLongIdent([id], [], [None]) - [ NamePatPairField(lid, mEq, Some m, pat, $2) ] } + [ NamePatPairField(lid, mEq, m, pat, $2) ] } | namePatPair seps_block namePatPairs { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range let lid = SynLongIdent([id], [], [None]) - NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $3 } + NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } | namePatPair seps_block seps_block namePatPairs { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range let lid = SynLongIdent([id], [], [None]) - NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $4 } + NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } namePatPair: | ident EQUALS parenPattern @@ -4008,18 +4008,18 @@ recordPatternElementsAux: | recordPatternElement opt_seps_block { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range - [ NamePatPairField(lid, mEq, Some m, pat, $2) ] } + [ NamePatPairField(lid, mEq, m, pat, $2) ] } | recordPatternElement seps_block recordPatternElementsAux { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range - NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $3 } + NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } | recordPatternElement seps_block seps_block recordPatternElementsAux { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range - NamePatPairField(lid, mEq, Some m, pat, Some $2) :: $4 } + NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } recordPatternElement: | path EQUALS parenPattern diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index f03f4f3338a..bc08c7fd0bd 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -6158,7 +6158,7 @@ FSharp.Compiler.Syntax.Ident: System.String ToString() FSharp.Compiler.Syntax.Ident: System.String get_idText() FSharp.Compiler.Syntax.Ident: System.String idText FSharp.Compiler.Syntax.Ident: Void .ctor(System.String, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent FieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent fieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent get_FieldName() @@ -6167,14 +6167,14 @@ FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat pat +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range Range +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range get_Range() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.NamePatPairField: Int32 Tag FSharp.Compiler.Syntax.NamePatPairField: Int32 get_Tag() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] Range FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] equalsRange -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_Range() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index f03f4f3338a..bc08c7fd0bd 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -6158,7 +6158,7 @@ FSharp.Compiler.Syntax.Ident: System.String ToString() FSharp.Compiler.Syntax.Ident: System.String get_idText() FSharp.Compiler.Syntax.Ident: System.String idText FSharp.Compiler.Syntax.Ident: Void .ctor(System.String, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.NamePatPairField NewNamePatPairField(FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent FieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent fieldName FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynLongIdent get_FieldName() @@ -6167,14 +6167,14 @@ FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat Pattern FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_Pattern() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat get_pat() FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Syntax.SynPat pat +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range Range +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range get_Range() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.NamePatPairField: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.NamePatPairField: Int32 Tag FSharp.Compiler.Syntax.NamePatPairField: Int32 get_Tag() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] Range FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] equalsRange -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_Range() FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_range() -FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] range FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator FSharp.Compiler.Syntax.NamePatPairField: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() FSharp.Compiler.Syntax.NamePatPairField: System.String ToString() diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl index 9bfdb8bbc1e..271af301d70 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl @@ -15,20 +15,20 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -42,13 +42,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -58,15 +58,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4445::Invoke([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+RowKind)][offset 0x00000128][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index ab33520cdd6..f839ec29e7b 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -15,11 +15,18 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x0000008A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000026] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000069][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. @@ -28,19 +35,12 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1447-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. @@ -59,7 +59,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000033][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000063][found Char] Unexpected type on the stack. @@ -67,8 +67,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -83,15 +83,15 @@ [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl index c4278fec485..7e0dcdbacdc 100644 --- a/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/ComplexArgumentsLambdaHasArrowRange.fs.bsl @@ -27,7 +27,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Y], [], [None]), - Some (3,9--3,10), Some (3,7--3,15), + Some (3,9--3,10), (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, @@ -92,7 +92,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Y], [], [None]), Some (3,9--3,10), - Some (3,7--3,15), + (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, @@ -115,7 +115,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Y], [], [None]), - Some (3,9--3,10), Some (3,7--3,15), + Some (3,9--3,10), (3,7--3,15), ListCons (Named (SynIdent (h, None), false, None, diff --git a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl index 3fbaecfe39d..575a421c923 100644 --- a/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Lambda/DestructedLambdaHasArrowRange.fs.bsl @@ -16,7 +16,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([X], [], [None]), Some (2,8--2,9), - Some (2,6--2,11), + (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13)), None, @@ -39,7 +39,7 @@ ImplFile ([Record ([NamePatPairField (SynLongIdent ([X], [], [None]), Some (2,8--2,9), - Some (2,6--2,11), + (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13))], @@ -49,7 +49,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([X], [], [None]), - Some (2,8--2,9), Some (2,6--2,11), + Some (2,8--2,9), (2,6--2,11), Named (SynIdent (x, None), false, None, (2,10--2,11)), None)], (2,4--2,13)), None, diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl index ef550849a11..1e6a423ef30 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl @@ -12,11 +12,11 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Wild (4,8--4,9), + (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), - Some (4,11--4,16), Wild (4,15--4,16), None)], + (4,11--4,16), Wild (4,15--4,16), None)], (4,4--4,17), { ParenRange = (4,3--4,17) }), None, (4,2--4,17)), None, Const (Int32 2, (4,21--4,22)), (4,2--4,22), Yes, { ArrowRange = Some (4,18--4,20) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl index d89f3e28ff2..03cdcd2af1f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl @@ -12,11 +12,11 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Wild (4,8--4,9), + (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), - Some (4,11--4,14), + (4,11--4,14), FromParseError (Wild (4,14--4,14), (4,14--4,14)), None)], (4,4--4,16), { ParenRange = (4,3--4,16) }), None, (4,2--4,16)), None, Const (Int32 2, (4,20--4,21)), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 7e21a510df9..27096cc44b7 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -12,11 +12,11 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Wild (4,8--4,9), + (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), None, - Some (4,11--4,12), + (4,11--4,12), FromParseError (Wild (4,12--4,12), (4,12--4,12)), None)], (4,4--4,13), { ParenRange = (4,3--4,13) }), None, (4,2--4,13)), None, Const (Int32 2, (4,17--4,18)), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl index 458a5b1827f..00ce8301648 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl @@ -12,7 +12,7 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Wild (4,8--4,9), + (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10)))], (4,4--4,10), { ParenRange = (4,3--4,11) }), None, (4,2--4,11)), None, Const (Int32 2, (4,15--4,16)), (4,2--4,16), Yes, diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index db8231fe243..9a8d806c6f0 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -12,11 +12,11 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Wild (4,8--4,9), + (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField (SynLongIdent ([c], [], [None]), Some (4,15--4,16), - Some (4,13--4,18), Wild (4,17--4,18), None)], + (4,13--4,18), Wild (4,17--4,18), None)], (4,4--4,19), { ParenRange = (4,3--4,19) }), None, (4,2--4,19)), None, Const (Int32 2, (4,23--4,24)), (4,2--4,24), Yes, { ArrowRange = Some (4,20--4,22) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl index 733ac88b5a9..a7bc36067bd 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl @@ -12,19 +12,19 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), + (4,4--4,9), Named (SynIdent (a, None), false, None, (4,8--4,9)), Some ((4,9--4,10), Some (4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), - Some (4,11--4,16), + (4,11--4,16), Named (SynIdent (b, None), false, None, (4,15--4,16)), Some ((4,16--4,17), Some (4,17))); NamePatPairField (SynLongIdent ([c], [], [None]), Some (4,20--4,21), - Some (4,18--4,23), + (4,18--4,23), Named (SynIdent (c, None), false, None, (4,22--4,23)), None)], (4,4--4,24), { ParenRange = (4,3--4,24) }), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl index 4247da84d41..813ba3344bd 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl @@ -18,21 +18,20 @@ ImplFile (SynLongIdent ([Foo; Bar; A], [(4,7--4,8); (4,11--4,12)], [None; None; None]), Some (4,14--4,15), - Some (4,4--4,17), Const (Int32 1, (4,16--4,17)), + (4,4--4,17), Const (Int32 1, (4,16--4,17)), Some ((4,17--4,18), Some (4,18))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,21--4,22), - Some (4,19--4,24), Const (Int32 2, (4,23--4,24)), + (4,19--4,24), Const (Int32 2, (4,23--4,24)), Some ((4,24--4,25), Some (4,25))); NamePatPairField (SynLongIdent ([C], [], [None]), Some (4,28--4,29), - Some (4,26--4,31), Const (Int32 3, (4,30--4,31)), - None)], (4,2--4,33)), None, - Const (Unit, (4,37--4,39)), (4,2--4,39), Yes, - { ArrowRange = Some (4,34--4,36) - BarRange = Some (4,0--4,1) })], (3,0--4,39), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,16--3,20) }), (3,0--4,39))], + (4,26--4,31), Const (Int32 3, (4,30--4,31)), None)], + (4,2--4,33)), None, Const (Unit, (4,37--4,39)), + (4,2--4,39), Yes, { ArrowRange = Some (4,34--4,36) + BarRange = Some (4,0--4,1) })], + (3,0--4,39), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,16--3,20) }), (3,0--4,39))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,39), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl index e1f0d8f98d6..d8fea47cf6f 100644 --- a/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/ParenthesesOfSynArgPatsNamePatPairs.fs.bsl @@ -13,7 +13,7 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([part1], [], [None]), - Some (4,10--4,11), Some (4,4--4,14), + Some (4,10--4,11), (4,4--4,14), Named (SynIdent (p1, None), false, None, (4,12--4,14)), None)], (4,4--5,13), diff --git a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl index 5aa0b81ac9b..983d374f240 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 01.fs.bsl @@ -10,12 +10,12 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Wild (4,8--4,9), None)], - (4,2--4,11)), None, Const (Unit, (4,15--4,17)), - (4,2--4,17), Yes, { ArrowRange = Some (4,12--4,14) - BarRange = Some (4,0--4,1) })], - (3,0--4,17), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,17))], + (4,4--4,9), Wild (4,8--4,9), None)], (4,2--4,11)), + None, Const (Unit, (4,15--4,17)), (4,2--4,17), Yes, + { ArrowRange = Some (4,12--4,14) + BarRange = Some (4,0--4,1) })], (3,0--4,17), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,17))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,17), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl index f18d255af01..d5138dff78c 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl @@ -10,16 +10,16 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Wild (4,8--4,9), + (4,4--4,9), Wild (4,8--4,9), Some ((4,9--4,10), Some (4,10))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,13--4,14), - Some (4,11--4,16), Wild (4,15--4,16), None)], - (4,2--4,18)), None, Const (Unit, (4,22--4,24)), - (4,2--4,24), Yes, { ArrowRange = Some (4,19--4,21) - BarRange = Some (4,0--4,1) })], - (3,0--4,24), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,24))], + (4,11--4,16), Wild (4,15--4,16), None)], (4,2--4,18)), + None, Const (Unit, (4,22--4,24)), (4,2--4,24), Yes, + { ArrowRange = Some (4,19--4,21) + BarRange = Some (4,0--4,1) })], (3,0--4,24), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,24))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,24), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl index fd73818cd81..a5cf1ae25b9 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 03.fs.bsl @@ -10,7 +10,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), - Some (4,4--4,7), + (4,4--4,7), FromParseError (Wild (4,7--4,7), (4,7--4,7)), None)], (4,2--4,9)), None, Const (Unit, (4,13--4,15)), (4,2--4,15), Yes, { ArrowRange = Some (4,10--4,12) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl index fed95dd4c68..996a57781f5 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 04.fs.bsl @@ -9,8 +9,7 @@ ImplFile [SynMatchClause (Record ([NamePatPairField - (SynLongIdent ([A], [], [None]), None, - Some (4,4--4,5), + (SynLongIdent ([A], [], [None]), None, (4,4--4,5), FromParseError (Wild (4,5--4,5), (4,5--4,5)), None)], (4,2--4,7)), None, Const (Unit, (4,11--4,13)), (4,2--4,13), Yes, { ArrowRange = Some (4,8--4,10) diff --git a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl index 798815d0efa..337fd109a31 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl @@ -10,21 +10,20 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), - Some (4,4--4,9), Const (Int32 1, (4,8--4,9)), + (4,4--4,9), Const (Int32 1, (4,8--4,9)), Some ((4,9--4,10), Some (4,10))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,13--4,14), - Some (4,11--4,16), Const (Int32 2, (4,15--4,16)), + (4,11--4,16), Const (Int32 2, (4,15--4,16)), Some ((4,16--4,17), Some (4,17))); NamePatPairField (SynLongIdent ([C], [], [None]), Some (4,20--4,21), - Some (4,18--4,23), Const (Int32 3, (4,22--4,23)), - None)], (4,2--4,25)), None, - Const (Unit, (4,29--4,31)), (4,2--4,31), Yes, - { ArrowRange = Some (4,26--4,28) - BarRange = Some (4,0--4,1) })], (3,0--4,31), - { MatchKeyword = (3,0--3,5) - WithKeyword = (3,9--3,13) }), (3,0--4,31))], + (4,18--4,23), Const (Int32 3, (4,22--4,23)), None)], + (4,2--4,25)), None, Const (Unit, (4,29--4,31)), + (4,2--4,31), Yes, { ArrowRange = Some (4,26--4,28) + BarRange = Some (4,0--4,1) })], + (3,0--4,31), { MatchKeyword = (3,0--3,5) + WithKeyword = (3,9--3,13) }), (3,0--4,31))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,31), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl index 1f2b1847340..b25fece4c04 100644 --- a/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/SynArgPatsNamePatPairsContainsTheRangeOfTheEqualsSign.fs.bsl @@ -16,7 +16,7 @@ ImplFile NamePatPairs ([NamePatPairField (SynLongIdent ([Y], [], [None]), Some (3,7--3,8), - Some (3,4--3,10), + (3,4--3,10), Named (SynIdent (y, None), false, None, (3,9--3,10)), None)], (3,4--3,11), { ParenRange = (3,3--3,11) }), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl index 0d0fb244496..d280afccb59 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl @@ -21,7 +21,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Name], [], [None]), - Some (3,17--3,18), Some (3,12--3,23), + Some (3,17--3,18), (3,12--3,23), Named (SynIdent (name, None), false, None, (3,19--3,23)), None)], (3,10--3,25)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl index db4100a0e4f..51ed7c21433 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl @@ -20,7 +20,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Name], [], [None]), - Some (3,16--3,17), Some (3,11--3,22), + Some (3,16--3,17), (3,11--3,22), Named (SynIdent (name, None), false, None, (3,18--3,22)), None)], (3,9--3,24)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl index 11c4fbcfa69..6095c4a0c36 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl @@ -22,14 +22,14 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Name], [], [None]), - Some (4,17--4,18), Some (4,12--4,23), + Some (4,17--4,18), (4,12--4,23), Named (SynIdent (name, None), false, None, (4,19--4,23)), Some ((4,23--4,24), Some (4,24))); NamePatPairField (SynLongIdent ([Age], [], [None]), - Some (4,29--4,30), Some (4,25--4,34), + Some (4,29--4,30), (4,25--4,34), Named (SynIdent (age, None), false, None, (4,31--4,34)), None)], (4,10--4,36)), @@ -53,7 +53,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Id], [], [None]), - Some (5,15--5,16), Some (5,12--5,19), + Some (5,15--5,16), (5,12--5,19), Named (SynIdent (id, None), false, None, (5,17--5,19)), None)], (5,10--5,21)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl index 4f4af581480..b740454c545 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl @@ -21,14 +21,14 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Name], [], [None]), - Some (4,16--4,17), Some (4,11--4,22), + Some (4,16--4,17), (4,11--4,22), Named (SynIdent (name, None), false, None, (4,18--4,22)), Some ((4,22--4,23), Some (4,23))); NamePatPairField (SynLongIdent ([Age], [], [None]), - Some (4,28--4,29), Some (4,24--4,33), + Some (4,28--4,29), (4,24--4,33), Named (SynIdent (age, None), false, None, (4,30--4,33)), None)], (4,9--4,35)), @@ -51,7 +51,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Id], [], [None]), - Some (5,14--5,15), Some (5,11--5,18), + Some (5,14--5,15), (5,11--5,18), Named (SynIdent (id, None), false, None, (5,16--5,18)), None)], (5,9--5,20)), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl index 7490bc7e31d..907255daef4 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl @@ -22,14 +22,14 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Name], [], [None]), - Some (4,17--4,18), Some (4,12--4,23), + Some (4,17--4,18), (4,12--4,23), Named (SynIdent (name, None), false, None, (4,19--4,23)), Some ((4,23--4,24), Some (4,24))); NamePatPairField (SynLongIdent ([Age], [], [None]), - Some (4,29--4,30), Some (4,25--4,34), + Some (4,29--4,30), (4,25--4,34), Named (SynIdent (age, None), false, None, (4,31--4,34)), None)], (4,10--4,36)), @@ -52,7 +52,7 @@ ImplFile (Record ([NamePatPairField (SynLongIdent ([Id], [], [None]), - Some (5,14--5,15), Some (5,11--5,18), + Some (5,14--5,15), (5,11--5,18), Named (SynIdent (id, None), false, None, (5,16--5,18)), None)], (5,9--5,20)), From 7afe4b1896c173afbcb21982848a809ff745cd1b Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Tue, 26 Aug 2025 12:20:25 +0100 Subject: [PATCH 28/32] ILVerify --- ..._FSharp.Compiler.Service_Debug_net10.0.bsl | 32 ++++++++--------- ....Compiler.Service_Debug_netstandard2.0.bsl | 34 +++++++++---------- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl index 271af301d70..9bfdb8bbc1e 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl @@ -15,20 +15,20 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -42,13 +42,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -58,15 +58,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize@4445::Invoke([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+RowKind)][offset 0x00000128][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 168cf3f27d7..6a676b52c7a 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -15,18 +15,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x0000008A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000026] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000069][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. @@ -35,12 +28,19 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3499-814::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiInteractionProcessor::CompletionsForPartialLID([FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompilerState, string)][offset 0x0000001B][found Char] Unexpected type on the stack. [IL]: Error [UnmanagedPointer]: : FSharp.Compiler.Interactive.Shell+Utilities+pointerToNativeInt@106::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. +[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1447-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Symbols+fullName@2498-1::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. @@ -59,8 +59,6 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2072-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths@2078-3::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000033][found Char] Unexpected type on the stack. @@ -69,8 +67,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness@3402::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -85,15 +83,15 @@ [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost@317::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input at line 68@68::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer@590::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. From e0e5e2d7e63d7d40831ae5add9c8a5bc899dc295 Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Tue, 26 Aug 2025 17:30:50 +0100 Subject: [PATCH 29/32] tests to show case when = is not present --- .../SyntaxTree/Pattern/Named field 03.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Named field 08.fs | 4 +++ .../SyntaxTree/Pattern/Named field 08.fs.bsl | 35 +++++++++++++++++++ .../data/SyntaxTree/Pattern/Named field 09.fs | 4 +++ .../SyntaxTree/Pattern/Named field 09.fs.bsl | 34 ++++++++++++++++++ 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 08.fs create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 09.fs create mode 100644 tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 27096cc44b7..1128e5d3107 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -30,4 +30,4 @@ ImplFile WarnDirectives = [] CodeComments = [] }, set [])) -(4,12)-(4,13) parse error Unexpected symbol ')' in pattern. Expected '=' or other token. +(4,12)-(4,13) parse error Unexpected symbol ')' in pattern. Expected '.', '=' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs new file mode 100644 index 00000000000..2b8bf60c548 --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs @@ -0,0 +1,4 @@ +module Module + +match { A = 1 } with +| { A ; B = 3 } -> a diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl new file mode 100644 index 00000000000..cd8a867459d --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl @@ -0,0 +1,35 @@ +ImplFile + (ParsedImplFileInput + ("/root/Pattern/Named field 08.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Match + (Yes (3,0--3,20), + Record + (None, None, + [SynExprRecordField + ((SynLongIdent ([A], [], [None]), true), + Some (3,10--3,11), Some (Const (Int32 1, (3,12--3,13))), + (3,8--3,13), None)], (3,6--3,15)), + [SynMatchClause + (Record + ([NamePatPairField + (SynLongIdent ([A], [], [None]), None, (4,4--4,5), + FromParseError (Wild (4,5--4,5), (4,5--4,5)), + Some ((4,6--4,7), Some (4,7))); + NamePatPairField + (SynLongIdent ([B], [], [None]), Some (4,10--4,11), + (4,8--4,13), Const (Int32 3, (4,12--4,13)), None)], + (4,2--4,15)), None, Ident a, (4,2--4,20), Yes, + { ArrowRange = Some (4,16--4,18) + BarRange = Some (4,0--4,1) })], (3,0--4,20), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,16--3,20) }), (3,0--4,20))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(4,6)-(4,7) parse error Unexpected symbol ';' in pattern. Expected '.', '=' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 09.fs b/tests/service/data/SyntaxTree/Pattern/Named field 09.fs new file mode 100644 index 00000000000..aa0961b9c6b --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 09.fs @@ -0,0 +1,4 @@ +module Module + +match 1 with +| A(a; b = c) -> a diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl new file mode 100644 index 00000000000..0899bb493d9 --- /dev/null +++ b/tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl @@ -0,0 +1,34 @@ +ImplFile + (ParsedImplFileInput + ("/root/Pattern/Named field 09.fs", false, QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (Match + (Yes (3,0--3,12), Const (Int32 1, (3,6--3,7)), + [SynMatchClause + (LongIdent + (SynLongIdent ([A], [], [None]), None, None, + NamePatPairs + ([NamePatPairField + (SynLongIdent ([a], [], [None]), None, (4,4--4,5), + FromParseError (Wild (4,5--4,5), (4,5--4,5)), + Some ((4,5--4,6), Some (4,6))); + NamePatPairField + (SynLongIdent ([b], [], [None]), Some (4,9--4,10), + (4,7--4,12), + Named + (SynIdent (c, None), false, None, (4,11--4,12)), + None)], (4,4--4,13), { ParenRange = (4,3--4,13) }), + None, (4,2--4,13)), None, Ident a, (4,2--4,18), Yes, + { ArrowRange = Some (4,14--4,16) + BarRange = Some (4,0--4,1) })], (3,0--4,18), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,18))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--4,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) + +(4,5)-(4,6) parse error Unexpected symbol ';' in pattern. Expected '.', '=' or other token. From ec60f7e3b3f59c4f4a76d15a8835b6cfde229f9f Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Tue, 26 Aug 2025 17:37:36 +0100 Subject: [PATCH 30/32] remove duplicated rule --- src/Compiler/pars.fsy | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 2b897036b47..6db53af6af9 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3656,36 +3656,21 @@ conjPatternElements: namePatPairs: | namePatPair opt_seps_block - { let (id: Ident), mEq, (pat: SynPat) = $1 - let m = unionRanges id.idRange pat.Range - let lid = SynLongIdent([id], [], [None]) + { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 + let m = unionRanges lid.Range pat.Range [ NamePatPairField(lid, mEq, m, pat, $2) ] } | namePatPair seps_block namePatPairs - { let (id: Ident), mEq, (pat: SynPat) = $1 - let m = unionRanges id.idRange pat.Range - let lid = SynLongIdent([id], [], [None]) + { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 + let m = unionRanges lid.Range pat.Range NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } | namePatPair seps_block seps_block namePatPairs { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) - let (id: Ident), mEq, (pat: SynPat) = $1 - let m = unionRanges id.idRange pat.Range - let lid = SynLongIdent([id], [], [None]) + let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 + let m = unionRanges lid.Range pat.Range NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } -namePatPair: - | ident EQUALS parenPattern - { let mEquals = rhs parseState 2 - $1, Some mEquals, $3 } - - | ident EQUALS recover - { let mEquals = rhs parseState 2 - $1, Some mEquals, patFromParseError (SynPat.Wild mEquals.EndRange) } - - | ident recover - { $1, None, patFromParseError (SynPat.Wild $1.idRange.EndRange) } - constrPattern: | atomicPatternLongIdent explicitValTyparDecls { let vis, lid = $1 @@ -3778,7 +3763,7 @@ atomicPattern: | quoteExpr { SynPat.QuoteExpr($1, lhs parseState) } - | LBRACE recordPatternElementsAux rbrace + | LBRACE namePatPairAux rbrace { SynPat.Record($2, rhs2 parseState 1 3) } | LBRACE error rbrace @@ -4004,24 +3989,24 @@ conjParenPatternElements: | parenPattern AMP parenPattern { $3 :: $1 :: [] } -recordPatternElementsAux: - | recordPatternElement opt_seps_block +namePatPairAux: + | namePatPair opt_seps_block { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range [ NamePatPairField(lid, mEq, m, pat, $2) ] } - | recordPatternElement seps_block recordPatternElementsAux + | namePatPair seps_block namePatPairAux { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } - | recordPatternElement seps_block seps_block recordPatternElementsAux + | namePatPair seps_block seps_block namePatPairAux { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } -recordPatternElement: +namePatPair: | path EQUALS parenPattern { let mEquals = rhs parseState 2 $1, Some mEquals, $3 } From 2c15fc937001bf3b9537ec2cef1d37f425651ba9 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 26 Aug 2025 17:38:29 +0100 Subject: [PATCH 31/32] Update src/Compiler/SyntaxTree/SyntaxTree.fsi Co-authored-by: Tomas Grosup --- src/Compiler/SyntaxTree/SyntaxTree.fsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index d35f6786ec0..819b0b384f2 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -1054,7 +1054,7 @@ type NamePatPairField = fieldName: SynLongIdent * /// The range of the equals sign in `name = pattern`, if present. equalsRange: range option * - /// The overall range of this name–pattern pair. + /// The overall range of this name–pattern pair. Starts with `fieldName`'s range and ends with `pat`s range. range: range * /// The pattern associated with the named field. pat: SynPat * From 39e4348a64e3fc00ab14ddbbf9522c8e78334c73 Mon Sep 17 00:00:00 2001 From: edgargonzalez Date: Tue, 26 Aug 2025 19:11:44 +0100 Subject: [PATCH 32/32] Revert "remove duplicated rule" This reverts commit ec60f7e3b3f59c4f4a76d15a8835b6cfde229f9f. --- src/Compiler/pars.fsy | 39 +++++++++++++------ .../SyntaxTree/Pattern/Named field 03.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 09.fs.bsl | 22 +++++------ 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 6e2c3a5adab..172bd9683e3 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3659,21 +3659,36 @@ conjPatternElements: namePatPairs: | namePatPair opt_seps_block - { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 - let m = unionRanges lid.Range pat.Range + { let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + let lid = SynLongIdent([id], [], [None]) [ NamePatPairField(lid, mEq, m, pat, $2) ] } | namePatPair seps_block namePatPairs - { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 - let m = unionRanges lid.Range pat.Range + { let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + let lid = SynLongIdent([id], [], [None]) NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } | namePatPair seps_block seps_block namePatPairs { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) - let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 - let m = unionRanges lid.Range pat.Range + let (id: Ident), mEq, (pat: SynPat) = $1 + let m = unionRanges id.idRange pat.Range + let lid = SynLongIdent([id], [], [None]) NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } +namePatPair: + | ident EQUALS parenPattern + { let mEquals = rhs parseState 2 + $1, Some mEquals, $3 } + + | ident EQUALS recover + { let mEquals = rhs parseState 2 + $1, Some mEquals, patFromParseError (SynPat.Wild mEquals.EndRange) } + + | ident recover + { $1, None, patFromParseError (SynPat.Wild $1.idRange.EndRange) } + constrPattern: | atomicPatternLongIdent explicitValTyparDecls { let vis, lid = $1 @@ -3766,7 +3781,7 @@ atomicPattern: | quoteExpr { SynPat.QuoteExpr($1, lhs parseState) } - | LBRACE namePatPairAux rbrace + | LBRACE recordPatternElementsAux rbrace { SynPat.Record($2, rhs2 parseState 1 3) } | LBRACE error rbrace @@ -3992,24 +4007,24 @@ conjParenPatternElements: | parenPattern AMP parenPattern { $3 :: $1 :: [] } -namePatPairAux: - | namePatPair opt_seps_block +recordPatternElementsAux: + | recordPatternElement opt_seps_block { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range [ NamePatPairField(lid, mEq, m, pat, $2) ] } - | namePatPair seps_block namePatPairAux + | recordPatternElement seps_block recordPatternElementsAux { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } - | namePatPair seps_block seps_block namePatPairAux + | recordPatternElement seps_block seps_block recordPatternElementsAux { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } -namePatPair: +recordPatternElement: | path EQUALS parenPattern { let mEquals = rhs parseState 2 $1, Some mEquals, $3 } diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 1128e5d3107..27096cc44b7 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -30,4 +30,4 @@ ImplFile WarnDirectives = [] CodeComments = [] }, set [])) -(4,12)-(4,13) parse error Unexpected symbol ')' in pattern. Expected '.', '=' or other token. +(4,12)-(4,13) parse error Unexpected symbol ')' in pattern. Expected '=' or other token. diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl index 0899bb493d9..a8245f3e9aa 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 09.fs.bsl @@ -9,18 +9,13 @@ ImplFile [SynMatchClause (LongIdent (SynLongIdent ([A], [], [None]), None, None, - NamePatPairs - ([NamePatPairField - (SynLongIdent ([a], [], [None]), None, (4,4--4,5), - FromParseError (Wild (4,5--4,5), (4,5--4,5)), - Some ((4,5--4,6), Some (4,6))); - NamePatPairField - (SynLongIdent ([b], [], [None]), Some (4,9--4,10), - (4,7--4,12), - Named - (SynIdent (c, None), false, None, (4,11--4,12)), - None)], (4,4--4,13), { ParenRange = (4,3--4,13) }), - None, (4,2--4,13)), None, Ident a, (4,2--4,18), Yes, + Pats + [FromParseError + (Paren + (Named + (SynIdent (a, None), false, None, (4,4--4,5)), + (4,3--4,5)), (4,3--4,5))], None, (4,2--4,5)), + None, Ident a, (4,2--4,18), Yes, { ArrowRange = Some (4,14--4,16) BarRange = Some (4,0--4,1) })], (3,0--4,18), { MatchKeyword = (3,0--3,5) @@ -31,4 +26,5 @@ ImplFile WarnDirectives = [] CodeComments = [] }, set [])) -(4,5)-(4,6) parse error Unexpected symbol ';' in pattern. Expected '.', '=' or other token. +(4,5)-(4,6) parse error Unexpected symbol ';' in pattern. Expected ')' or other token. +(4,3)-(4,4) parse error Unmatched '('