diff --git a/src/fsharp/lexhelp.fs b/src/fsharp/lexhelp.fs index 76e317797bf..bb93921b02b 100644 --- a/src/fsharp/lexhelp.fs +++ b/src/fsharp/lexhelp.fs @@ -281,18 +281,15 @@ module Keywords = ] (*------- reserved keywords which are ml-compatibility ids *) @ List.map (fun s -> (FSHARP,s,RESERVED)) - [ "atomic"; "break"; - "checked"; "component"; "constraint"; "constructor"; "continue"; - "eager"; - "fixed"; "fori"; "functor"; + [ "break"; + "checked"; "component"; "constraint"; "continue"; + "fixed"; "fori"; "include"; - "measure"; "method"; "mixin"; - "object"; + "mixin"; "parallel"; "params"; "process"; "protected"; "pure"; - "recursive"; "sealed"; "trait"; "tailcall"; - "virtual"; "volatile"; ] + "virtual"; ] let private unreserveWords = keywordList |> List.choose (function (mode,keyword,_) -> if mode = FSHARP then Some keyword else None) diff --git a/tests/fsharp/typecheck/sigs/neg02.bsl b/tests/fsharp/typecheck/sigs/neg02.bsl index 77a47cc01ce..b7119f8e1d4 100644 --- a/tests/fsharp/typecheck/sigs/neg02.bsl +++ b/tests/fsharp/typecheck/sigs/neg02.bsl @@ -3,6 +3,4 @@ neg02.fs(6,8,6,15): parse error FS0046: The identifier 'virtual' is reserved for neg02.fs(6,8,6,15): parse error FS0010: Unexpected identifier in member definition -neg02.fs(11,8,11,14): parse error FS0046: The identifier 'method' is reserved for future use by F# - neg02.fs(17,7,17,13): parse error FS0010: Unexpected keyword 'static' in member definition. Expected 'member', 'override' or other token. diff --git a/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/E_ReservedIdentKeywords.fs b/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/E_ReservedIdentKeywords.fs index 2c550ad3d3c..ec38124d2be 100644 --- a/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/E_ReservedIdentKeywords.fs +++ b/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/E_ReservedIdentKeywords.fs @@ -1,60 +1,60 @@ // #Regression #Conformance #LexicalAnalysis // Reserved identifiers and keywords // Also cover regression test for FSHARP1.0:5367 (keyword 'virtual') -let atomic = 10 + let break = 10 let checked = 10 let component = 10 let constraint = 10 -let constructor = 10 + let continue = 10 -let eager = 10 + let fixed = 10 let fori = 10 -let functor = 10 + let include = 10 -let method = 10 -let measure = 10 + + let mixin = 10 -let object = 10 + let parallel = 10 let params = 10 let process = 10 let protected = 10 let pure = 10 -let recursive = 10 + let sealed = 10 let tailcall = 10 let trait = 10 let virtual = 10 -let volatile = 10 -//The identifier 'atomic' is reserved for future use by F# + + //The identifier 'break' is reserved for future use by F# //The identifier 'checked' is reserved for future use by F# //The identifier 'component' is reserved for future use by F# //The identifier 'constraint' is reserved for future use by F# -//The identifier 'constructor' is reserved for future use by F# + //The identifier 'continue' is reserved for future use by F# -//The identifier 'eager' is reserved for future use by F# + //The identifier 'fixed' is reserved for future use by F# //The identifier 'fori' is reserved for future use by F# -//The identifier 'functor' is reserved for future use by F# + //The identifier 'include' is reserved for future use by F# -//The identifier 'method' is reserved for future use by F# -//The identifier 'measure' is reserved for future use by F# + + //The identifier 'mixin' is reserved for future use by F# -//The identifier 'object' is reserved for future use by F# + //The identifier 'parallel' is reserved for future use by F# //The identifier 'params' is reserved for future use by F# //The identifier 'process' is reserved for future use by F# //The identifier 'protected' is reserved for future use by F# //The identifier 'pure' is reserved for future use by F# -//The identifier 'recursive' is reserved for future use by F# + //The identifier 'sealed' is reserved for future use by F# //The identifier 'tailcall' is reserved for future use by F# //The identifier 'trait' is reserved for future use by F# //The identifier 'virtual' is reserved for future use by F# -//The identifier 'volatile' is reserved for future use by F# + diff --git a/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/W_ReservedWord01.fs b/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/W_ReservedWord01.fs index 8b3a8681950..070cfca18ff 100644 --- a/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/W_ReservedWord01.fs +++ b/tests/fsharpqa/Source/Conformance/LexicalAnalysis/IdentifiersAndKeywords/W_ReservedWord01.fs @@ -3,8 +3,8 @@ // Verify warning when using a reserved identifier -//The identifier 'atomic' is reserved for future use by F# -let atomic = 1 + + exit 0 diff --git a/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs b/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs index 86be53980a5..e06e5d29f24 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs +++ b/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs @@ -876,8 +876,8 @@ but here has type member public this.``Warning.ConsistentWithLanguageService``() = let fileContent = """ open System - atomic atomic atomic atomic atomic atomic atomic atomic atomic atomic - atomic atomic atomic atomic atomic atomic atomic atomic atomic atomic""" + mixin mixin mixin mixin mixin mixin mixin mixin mixin mixin + mixin mixin mixin mixin mixin mixin mixin mixin mixin mixin""" let (_, project, file) = this.CreateSingleFileProject(fileContent, fileKind = SourceFileKind.FSX) TakeCoffeeBreak(this.VS) // Wait for the background compiler to catch up. let warnList = GetWarnings(project) @@ -887,8 +887,8 @@ but here has type member public this.``Warning.ConsistentWithLanguageService.Comment``() = let fileContent = """ open System - //atomic atomic atomic atomic atomic atomic atomic atomic atomic atomic - //atomic atomic atomic atomic atomic atomic atomic atomic atomic atomic""" + //mixin mixin mixin mixin mixin mixin mixin mixin mixin mixin + //mixin mixin mixin mixin mixin mixin mixin mixin mixin mixin""" let (_, project, file) = this.CreateSingleFileProject(fileContent, fileKind = SourceFileKind.FSX) TakeCoffeeBreak(this.VS) // Wait for the background compiler to catch up. let warnList = GetWarnings(project)