diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index 443f6c6efd2..d468a8a9968 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -40,8 +40,6 @@ - - diff --git a/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs b/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs index ca720f0927f..aa4e9441f8a 100644 --- a/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs +++ b/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs @@ -5,15 +5,10 @@ namespace Microsoft.VisualStudio.FSharp.LanguageService open System -open System.IO -open System.Collections.Generic open System.Diagnostics open Microsoft.VisualStudio -open Microsoft.VisualStudio.Shell -open Microsoft.VisualStudio.Shell.Interop open Microsoft.VisualStudio.TextManager.Interop open FSharp.Compiler -open FSharp.Compiler.Lib open FSharp.Compiler.SourceCodeServices module internal OperatorToken = @@ -21,7 +16,9 @@ module internal OperatorToken = let asIdentifier_DEPRECATED (token : TokenInfo) = // Typechecker reports information about all values in the same fashion no matter whether it is named value (let binding) or operator // here we piggyback on this fact and just pretend that we need data time for identifier - let tagOfIdentToken = FSharp.Compiler.Parser.tagOfToken(FSharp.Compiler.Parser.IDENT "") + + let tagOfIdentToken = FSharpTokenTag.IDENT + let endCol = token.EndIndex + 1 // EndIndex from GetTokenInfoAt points to the last operator char, but here it should point to column 'after' the last char tagOfIdentToken, token.StartIndex, endCol @@ -69,7 +66,9 @@ module internal GotoDefinition = |> GotoDefinitionResult_DEPRECATED.MakeError | Some(colIdent, tag, qualId) -> if typedResults.HasFullTypeCheckInfo then - if Parser.tokenTagToTokenId tag <> Parser.TOKEN_IDENT then + // Used to be the Parser's internal definition, now hard-coded to avoid an IVT into the parser itsef. + // Dead code (aside from legacy tests), ignore + if tag <> FSharpTokenTag.IDENT then Strings.GotoDefinitionFailed_NotIdentifier() |> GotoDefinitionResult_DEPRECATED.MakeError else diff --git a/vsintegration/src/FSharp.LanguageService/Intellisense.fs b/vsintegration/src/FSharp.LanguageService/Intellisense.fs index b380bf13e20..dbf9d7fa5ab 100644 --- a/vsintegration/src/FSharp.LanguageService/Intellisense.fs +++ b/vsintegration/src/FSharp.LanguageService/Intellisense.fs @@ -224,7 +224,7 @@ type internal FSharpDeclarations_DEPRECATED(documentationBuilder, declarations: // We intercept this call only to get the initial extent // of what was committed to the source buffer. let result = decl.GetName(filterText, index) - FSharp.Compiler.Lexhelp.Keywords.QuoteIdentifierIfNeeded result + Keywords.QuoteIdentifierIfNeeded result override decl.IsCommitChar(commitCharacter) = // Usual language identifier rules... diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs index 47e8e3b1134..6bc62eda151 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs @@ -101,25 +101,6 @@ type UsingMSBuild() = n ) 0 - - [] - member public this.``PublicSurfaceArea.DotNetReflection``() = - let ps = publicTypesInAsm @"FSharp.ProjectSystem.FSharp.dll" - Assert.AreEqual(1, ps) // BuildPropertyDescriptor - let ls = publicTypesInAsm @"FSharp.LanguageService.dll" - Assert.AreEqual(0, ls) - let compis = publicTypesInAsm @"FSharp.Compiler.Interactive.Settings.dll" - Assert.AreEqual(5, compis) - let compserver = publicTypesInAsm @"FSharp.Compiler.Server.Shared.dll" - Assert.AreEqual(0, compserver) - let lsbase = publicTypesInAsm @"FSharp.LanguageService.Base.dll" - Assert.AreEqual(0, lsbase) - let psbase = publicTypesInAsm @"FSharp.ProjectSystem.Base.dll" - Assert.AreEqual(17, psbase) - let fsi = publicTypesInAsm @"FSharp.VS.FSI.dll" - Assert.AreEqual(1, fsi) - - [] member public this.``ReconcileErrors.Test1``() = let (_solution, project, file) = this.CreateSingleFileProject(["erroneous"])