From 915d9b0035e7ee2e69ff669981e23298731bae31 Mon Sep 17 00:00:00 2001 From: ijklam <43789618+Tangent-90@users.noreply.github.com> Date: Sat, 29 Mar 2025 21:01:45 +0800 Subject: [PATCH 1/5] static param completion --- src/Compiler/Service/FSharpCheckerResults.fs | 42 +++++++++++++++++++ .../Service/ServiceParamInfoLocations.fs | 9 ---- src/Compiler/Service/ServiceParsedInputOps.fs | 29 ++++++++++++- .../Service/ServiceParsedInputOps.fsi | 3 ++ src/Compiler/SyntaxTree/SyntaxTreeOps.fs | 9 ++++ src/Compiler/SyntaxTree/SyntaxTreeOps.fsi | 2 + 6 files changed, 83 insertions(+), 11 deletions(-) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 57d322c81a8..7ac3e63bd2f 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1939,6 +1939,48 @@ type internal TypeCheckInfo getDeclaredItemsNotInRangeOpWithAllSymbols () |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) + | Some(CompletionContext.TypeProviderStaticArgumentList(endPos, fields)) -> + let cnrs = GetCapturedNameResolutions endPos ResolveOverloads.No + + if cnrs.Count = 0 then + getDeclaredItemsNotInRangeOpWithAllSymbols () + |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) + else + let cnr = cnrs[cnrs.Count - 1] + let m = cnr.Range + + match cnr with + // If the type is a type provider, return the static parameter names + | CNR((Item.Types(_, containerTy :: _) & ItemIsProvidedTypeWithStaticArguments m g staticParameters), _, denv, _, _, _) -> + let staticParameters = + staticParameters + |> Array.choose (fun sp -> + let name = sp.PUntaint((fun sp -> sp.Name), m) + + if fields.Contains name then + None + else + let ty = + Import.ImportProvidedType amap m (sp.PApply((fun sp -> sp.ParameterType), m)) + + Item.OtherName( + Some(Ident(name, m)), + ty, + None, + Some(containerTy |> tcrefOfAppTy g |> ArgumentContainer.Type), + m + ) + |> ItemWithNoInst + |> Some) + |> Array.toList + + Some(toCompletionItems (staticParameters, denv, m)) + + // If the type is not type provider, return the types + | _ -> + getDeclaredItemsNotInRangeOpWithAllSymbols () + |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) + | Some(CompletionContext.Pattern patternContext) -> match patternContext with | PatternContext.UnionCaseFieldIdentifier(referencedFields, caseIdRange) -> diff --git a/src/Compiler/Service/ServiceParamInfoLocations.fs b/src/Compiler/Service/ServiceParamInfoLocations.fs index 2556111a21a..03c1e3f68b2 100755 --- a/src/Compiler/Service/ServiceParamInfoLocations.fs +++ b/src/Compiler/Service/ServiceParamInfoLocations.fs @@ -59,15 +59,6 @@ type ParameterLocations [] module internal ParameterLocationsImpl = - let isStaticArg (StripParenTypes synType) = - match synType with - | SynType.StaticConstant _ - | SynType.StaticConstantNull _ - | SynType.StaticConstantExpr _ - | SynType.StaticConstantNamed _ -> true - | SynType.LongIdent _ -> true // NOTE: this is not a static constant, but it is a prefix of incomplete code, e.g. "TP<42, Arg3" is a prefix of "TP<42, Arg3=6>" and Arg3 shows up as a LongId - | _ -> false - /// Dig out an identifier from an expression that used in an application let rec digOutIdentFromFuncExpr synExpr = // we found it, dig out ident diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index f5b15936902..206b3b4fe8d 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -121,6 +121,8 @@ type CompletionContext = isStatic: bool * spacesBeforeEnclosingDefinition: int + | TypeProviderStaticArgumentList of typeNameEndPos: pos * settedParams: HashSet + type ShortIdent = string type ShortIdents = ShortIdent[] @@ -1454,6 +1456,19 @@ module ParsedInput = | SynExpr.Record(None, None, [], _) -> Some(CompletionContext.RecordField RecordContext.Empty) + // TypeProvider<$>. + | SynExpr.TypeApp(expr, _, args, _, _, typeArgsRange, _) when + rangeContainsPos typeArgsRange pos && args |> List.forall isStaticArg + -> + let argNames = + args + |> List.choose (function + | SynType.StaticConstantNamed(SynType.LongIdent lid, _, _) -> Some lid.LongIdent.Head.idText + | _ -> None) + |> HashSet + + Some(CompletionContext.TypeProviderStaticArgumentList(expr.Range.End, argNames)) + // Unchecked.defaultof | SynExpr.TypeApp(typeArgsRange = range) when rangeContainsPos range pos -> Some CompletionContext.Type @@ -1815,9 +1830,19 @@ module ParsedInput = // The value expression should still get completions None) - member _.VisitTypeAbbrev(_, _, range) = + member _.VisitTypeAbbrev(_, ty, range) = if rangeContainsPos range pos then - Some CompletionContext.TypeAbbreviationOrSingleCaseUnion + match ty with + | SynType.App(SynType.LongIdent lid, _, args, _, _, false, _) when args |> List.forall isStaticArg -> + let argNames = + args + |> List.choose (function + | SynType.StaticConstantNamed(SynType.LongIdent lid, _, _) -> Some lid.LongIdent.Head.idText + | _ -> None) + |> HashSet + + Some(CompletionContext.TypeProviderStaticArgumentList(lid.Range.End, argNames)) + | _ -> Some CompletionContext.TypeAbbreviationOrSingleCaseUnion else None diff --git a/src/Compiler/Service/ServiceParsedInputOps.fsi b/src/Compiler/Service/ServiceParsedInputOps.fsi index d99277893d4..650d58876bb 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fsi +++ b/src/Compiler/Service/ServiceParsedInputOps.fsi @@ -92,6 +92,9 @@ type public CompletionContext = hasThis: bool * isStatic: bool * spacesBeforeEnclosingDefinition: int + + /// Completing static named parameters of a type provider. `NonProviderType<$>` will also match this. + | TypeProviderStaticArgumentList of typeNameEndPos: pos * assignedParams: HashSet type public ModuleKind = { IsAutoOpen: bool diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index ffb9bd65647..70aa42e8858 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -586,6 +586,15 @@ let rec stripParenTypes synType = let (|StripParenTypes|) synType = stripParenTypes synType +let isStaticArg (StripParenTypes synType) = + match synType with + | SynType.StaticConstant _ + | SynType.StaticConstantNull _ + | SynType.StaticConstantExpr _ + | SynType.StaticConstantNamed _ -> true + | SynType.LongIdent _ -> true // NOTE: this is not a static constant, but it is a prefix of incomplete code, e.g. "TP<42, Arg3" is a prefix of "TP<42, Arg3=6>" and Arg3 shows up as a LongId + | _ -> false + /// Operations related to the syntactic analysis of arguments of value, function and member definitions and signatures. module SynInfo = diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi b/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi index 49190452b4f..26d3e088085 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi @@ -198,6 +198,8 @@ val stripParenTypes: synType: SynType -> SynType val (|StripParenTypes|): synType: SynType -> SynType +val isStaticArg: SynType -> bool + /// Operations related to the syntactic analysis of arguments of value, function and member definitions and signatures. module SynInfo = /// The argument information for an argument without a name From 4383f99f930825ec90855641e245aeb42e73d731 Mon Sep 17 00:00:00 2001 From: ijklam <43789618+Tangent-90@users.noreply.github.com> Date: Sat, 29 Mar 2025 21:24:26 +0800 Subject: [PATCH 2/5] fix build --- src/Compiler/Service/ServiceParsedInputOps.fs | 2 +- src/Compiler/Service/ServiceParsedInputOps.fsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 206b3b4fe8d..441fe1e15bd 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -121,7 +121,7 @@ type CompletionContext = isStatic: bool * spacesBeforeEnclosingDefinition: int - | TypeProviderStaticArgumentList of typeNameEndPos: pos * settedParams: HashSet + | TypeProviderStaticArgumentList of typeNameEndPos: pos * assignedParams: HashSet type ShortIdent = string diff --git a/src/Compiler/Service/ServiceParsedInputOps.fsi b/src/Compiler/Service/ServiceParsedInputOps.fsi index 650d58876bb..2c5166ab045 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fsi +++ b/src/Compiler/Service/ServiceParsedInputOps.fsi @@ -92,7 +92,7 @@ type public CompletionContext = hasThis: bool * isStatic: bool * spacesBeforeEnclosingDefinition: int - + /// Completing static named parameters of a type provider. `NonProviderType<$>` will also match this. | TypeProviderStaticArgumentList of typeNameEndPos: pos * assignedParams: HashSet From b4f7cfed41078956dbd58ecc2d189ddeb9b614d6 Mon Sep 17 00:00:00 2001 From: ijklam <43789618+Tangent-90@users.noreply.github.com> Date: Sat, 29 Mar 2025 22:21:09 +0800 Subject: [PATCH 3/5] try fix build --- src/Compiler/Service/FSharpCheckerResults.fs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index 7ac3e63bd2f..24981629562 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1940,6 +1940,10 @@ type internal TypeCheckInfo |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) | Some(CompletionContext.TypeProviderStaticArgumentList(endPos, fields)) -> +#if NO_TYPEPROVIDERS + getDeclaredItemsNotInRangeOpWithAllSymbols () + |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) +#else let cnrs = GetCapturedNameResolutions endPos ResolveOverloads.No if cnrs.Count = 0 then @@ -1980,6 +1984,7 @@ type internal TypeCheckInfo | _ -> getDeclaredItemsNotInRangeOpWithAllSymbols () |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) +#endif | Some(CompletionContext.Pattern patternContext) -> match patternContext with From e0a56e59f01e77214fbf06a5674d6c72635a3ebb Mon Sep 17 00:00:00 2001 From: ijklam <43789618+Tangent-90@users.noreply.github.com> Date: Sat, 29 Mar 2025 22:33:02 +0800 Subject: [PATCH 4/5] try fix build --- 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 24981629562..accbda22cfe 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -1939,12 +1939,12 @@ type internal TypeCheckInfo getDeclaredItemsNotInRangeOpWithAllSymbols () |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) - | Some(CompletionContext.TypeProviderStaticArgumentList(endPos, fields)) -> + | Some(CompletionContext.TypeProviderStaticArgumentList(_endPos, _fields)) -> #if NO_TYPEPROVIDERS getDeclaredItemsNotInRangeOpWithAllSymbols () |> Option.bind (FilterRelevantItemsBy getItem2 None IsTypeCandidate) #else - let cnrs = GetCapturedNameResolutions endPos ResolveOverloads.No + let cnrs = GetCapturedNameResolutions _endPos ResolveOverloads.No if cnrs.Count = 0 then getDeclaredItemsNotInRangeOpWithAllSymbols () @@ -1961,7 +1961,7 @@ type internal TypeCheckInfo |> Array.choose (fun sp -> let name = sp.PUntaint((fun sp -> sp.Name), m) - if fields.Contains name then + if _fields.Contains name then None else let ty = From 9320c38870a3dd1e3fdd6f2365017c64d65ecee2 Mon Sep 17 00:00:00 2001 From: ijklam <43789618+Tangent-90@users.noreply.github.com> Date: Sun, 30 Mar 2025 13:17:34 +0800 Subject: [PATCH 5/5] release note; baseline --- docs/release-notes/.FSharp.Compiler.Service/9.0.300.md | 1 + ...ompiler.Service.SurfaceArea.netstandard20.release.bsl | 9 +++++++++ .../ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl | 2 +- ...rify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl | 4 ++-- .../ilverify_FSharp.Compiler.Service_Release_net9.0.bsl | 2 +- ...fy_FSharp.Compiler.Service_Release_netstandard2.0.bsl | 4 ++-- 6 files changed, 16 insertions(+), 6 deletions(-) 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 c4e4a6a1403..246b13bfc28 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.300.md @@ -29,6 +29,7 @@ * Symbols: Add FSharpAssembly.IsFSharp ([PR #18290](https://github.com/dotnet/fsharp/pull/18290)) * Type parameter constraint `null` in generic code will now automatically imply `not struct` ([Issue #18320](https://github.com/dotnet/fsharp/issues/18320), [PR #18323](https://github.com/dotnet/fsharp/pull/18323)) * Add a switch to determine whether to generate a default implementation body for overridden method when completing. [PR #18341](https://github.com/dotnet/fsharp/pull/18341) +* Static parameters of type provider completion. ([PR #18427](https://github.com/dotnet/fsharp/pull/18427)) ### Changed 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 f89f7a406be..f71645baa46 100755 --- 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 @@ -3072,7 +3072,12 @@ FSharp.Compiler.EditorServices.CompletionContext+Tags: Int32 RangeOperator FSharp.Compiler.EditorServices.CompletionContext+Tags: Int32 RecordField FSharp.Compiler.EditorServices.CompletionContext+Tags: Int32 Type FSharp.Compiler.EditorServices.CompletionContext+Tags: Int32 TypeAbbreviationOrSingleCaseUnion +FSharp.Compiler.EditorServices.CompletionContext+Tags: Int32 TypeProviderStaticArgumentList FSharp.Compiler.EditorServices.CompletionContext+Tags: Int32 UnionCaseFieldsDeclaration +FSharp.Compiler.EditorServices.CompletionContext+TypeProviderStaticArgumentList: FSharp.Compiler.Text.Position get_typeNameEndPos() +FSharp.Compiler.EditorServices.CompletionContext+TypeProviderStaticArgumentList: FSharp.Compiler.Text.Position typeNameEndPos +FSharp.Compiler.EditorServices.CompletionContext+TypeProviderStaticArgumentList: System.Collections.Generic.HashSet`1[System.String] assignedParams +FSharp.Compiler.EditorServices.CompletionContext+TypeProviderStaticArgumentList: System.Collections.Generic.HashSet`1[System.String] get_assignedParams() FSharp.Compiler.EditorServices.CompletionContext: Boolean Equals(FSharp.Compiler.EditorServices.CompletionContext) FSharp.Compiler.EditorServices.CompletionContext: Boolean Equals(FSharp.Compiler.EditorServices.CompletionContext, System.Collections.IEqualityComparer) FSharp.Compiler.EditorServices.CompletionContext: Boolean Equals(System.Object) @@ -3088,6 +3093,7 @@ FSharp.Compiler.EditorServices.CompletionContext: Boolean IsRangeOperator FSharp.Compiler.EditorServices.CompletionContext: Boolean IsRecordField FSharp.Compiler.EditorServices.CompletionContext: Boolean IsType FSharp.Compiler.EditorServices.CompletionContext: Boolean IsTypeAbbreviationOrSingleCaseUnion +FSharp.Compiler.EditorServices.CompletionContext: Boolean IsTypeProviderStaticArgumentList FSharp.Compiler.EditorServices.CompletionContext: Boolean IsUnionCaseFieldsDeclaration FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsAttributeApplication() FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsInherit() @@ -3100,6 +3106,7 @@ FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsRangeOperator() FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsRecordField() FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsType() FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsTypeAbbreviationOrSingleCaseUnion() +FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsTypeProviderStaticArgumentList() FSharp.Compiler.EditorServices.CompletionContext: Boolean get_IsUnionCaseFieldsDeclaration() FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext AttributeApplication FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext Invalid @@ -3109,6 +3116,7 @@ FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext NewParameterList(FSharp.Compiler.Text.Position, System.Collections.Generic.HashSet`1[System.String]) FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext NewPattern(FSharp.Compiler.EditorServices.PatternContext) FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext NewRecordField(FSharp.Compiler.EditorServices.RecordContext) +FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext NewTypeProviderStaticArgumentList(FSharp.Compiler.Text.Position, System.Collections.Generic.HashSet`1[System.String]) FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext RangeOperator FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext Type FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext TypeAbbreviationOrSingleCaseUnion @@ -3126,6 +3134,7 @@ FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext+Pattern FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext+RecordField FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext+Tags +FSharp.Compiler.EditorServices.CompletionContext: FSharp.Compiler.EditorServices.CompletionContext+TypeProviderStaticArgumentList FSharp.Compiler.EditorServices.CompletionContext: Int32 GetHashCode() FSharp.Compiler.EditorServices.CompletionContext: Int32 GetHashCode(System.Collections.IEqualityComparer) FSharp.Compiler.EditorServices.CompletionContext: Int32 Tag diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl index 69842b9e059..85983d45072 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -23,7 +23,7 @@ [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@3502-805::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@110::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]: : .$FSharpCheckerResults+dataTipOfReferences@2272::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::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@921-509::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@921-509::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_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 6e41547cd11..c2805234641 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -31,10 +31,10 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3502-805::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@110::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]: : .$FSharpCheckerResults+dataTipOfReferences@2272::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 0x00000605][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1426-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 0x00000649][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-509::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@921-509::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@921-509::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_net9.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl index 4e7b5396676..5a45e666130 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -22,7 +22,7 @@ [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@3502-849::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]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2272::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::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@921-530::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@921-530::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/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 431d4e5512a..c9b280f270e 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -30,10 +30,10 @@ [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@3502-849::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]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2272::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@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 0x00000620][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1426-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 0x0000065D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@921-530::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@921-530::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@921-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack.