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 c839dcc3292..8c208c42e31 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -1,6 +1,7 @@ ### Fixed * Fix parsing errors using anonymous records and units of measures ([PR #18543](https://github.com/dotnet/fsharp/pull/18543)) +* Fix parsing errors using anonymous records and code quotations ([PR #18603](https://github.com/dotnet/fsharp/pull/18603)) * Fixed: Allow `return`, `return!`, `yield`, `yield!` type annotations without parentheses ([PR #18533](https://github.com/dotnet/fsharp/pull/18533)) * Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508)) * Fix find all references for F# exceptions ([PR #18565](https://github.com/dotnet/fsharp/pull/18565)) diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs index 5f96b1f58c8..e615d4ba336 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fs +++ b/src/Compiler/Driver/CompilerDiagnostics.fs @@ -1168,6 +1168,7 @@ type Exception with | Parser.TOKEN_GREATER_RBRACK -> SR.GetString("Parser.TOKEN.GREATER.RBRACK") | Parser.TOKEN_RQUOTE_DOT | Parser.TOKEN_RQUOTE -> SR.GetString("Parser.TOKEN.RQUOTE") + | Parser.TOKEN_RQUOTE_BAR_RBRACE -> SR.GetString("Parser.TOKEN.RQUOTE.BAR.RBRACE") | Parser.TOKEN_RBRACK -> SR.GetString("Parser.TOKEN.RBRACK") | Parser.TOKEN_RBRACE | Parser.TOKEN_RBRACE_COMING_SOON diff --git a/src/Compiler/FSStrings.resx b/src/Compiler/FSStrings.resx index 8453259ea1b..1b8be22d319 100644 --- a/src/Compiler/FSStrings.resx +++ b/src/Compiler/FSStrings.resx @@ -360,6 +360,9 @@ symbol '>|}' + + symbol '@>|}' or '@@>|}' + symbol '>|]' diff --git a/src/Compiler/Service/ServiceLexing.fs b/src/Compiler/Service/ServiceLexing.fs index fb2af965f76..74141b4805d 100644 --- a/src/Compiler/Service/ServiceLexing.fs +++ b/src/Compiler/Service/ServiceLexing.fs @@ -287,6 +287,7 @@ module internal TokenClassifications = | GREATER_BAR_RBRACK -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None) | RQUOTE _ + | RQUOTE_BAR_RBRACE _ | RBRACK | RBRACE _ | RBRACE_COMING_SOON @@ -1389,6 +1390,7 @@ type FSharpTokenKind = | RightArrow | GreaterBarRightBracket | GreaterBarRightBrace + | RQuoteBarRightBrace | LeftParenthesisStarRightParenthesis | Open | Or @@ -1659,6 +1661,7 @@ type FSharpToken = | LQUOTE _ -> FSharpTokenKind.LeftQuote | RQUOTE _ -> FSharpTokenKind.RightQuote | RQUOTE_DOT _ -> FSharpTokenKind.RightQuoteDot + | RQUOTE_BAR_RBRACE _ -> FSharpTokenKind.RQuoteBarRightBrace | PERCENT_OP _ -> FSharpTokenKind.PercentOperator | BINDER _ -> FSharpTokenKind.Binder | LESS _ -> FSharpTokenKind.Less diff --git a/src/Compiler/Service/ServiceLexing.fsi b/src/Compiler/Service/ServiceLexing.fsi index 1efcf59269d..869b295d338 100755 --- a/src/Compiler/Service/ServiceLexing.fsi +++ b/src/Compiler/Service/ServiceLexing.fsi @@ -458,6 +458,7 @@ type public FSharpTokenKind = | RightArrow | GreaterBarRightBracket | GreaterBarRightBrace + | RQuoteBarRightBrace | LeftParenthesisStarRightParenthesis | Open | Or diff --git a/src/Compiler/SyntaxTree/LexFilter.fs b/src/Compiler/SyntaxTree/LexFilter.fs index a97fb94d5e4..e298202d984 100644 --- a/src/Compiler/SyntaxTree/LexFilter.fs +++ b/src/Compiler/SyntaxTree/LexFilter.fs @@ -1210,6 +1210,11 @@ type LexFilterImpl ( delayToken (pool.UseShiftedLocation(tokenTup, BAR_RBRACK, 1, 0)) delayToken (pool.UseShiftedLocation(tokenTup, GREATER res, 0, -2)) pool.Return tokenTup + | RQUOTE_BAR_RBRACE x -> + lexbuf.CheckLanguageFeatureAndRecover LanguageFeature.BetterAnonymousRecordParsing lexbuf.LexemeRange + delayToken (pool.UseShiftedLocation(tokenTup, BAR_RBRACE, 1, 0)) + delayToken (pool.UseShiftedLocation(tokenTup, RQUOTE(x), 0, -2)) + pool.Return tokenTup | GREATER_RBRACK -> delayToken (pool.UseShiftedLocation(tokenTup, RBRACK, 1, 0)) delayToken (pool.UseShiftedLocation(tokenTup, GREATER res, 0, -1)) @@ -2631,6 +2636,13 @@ type LexFilterImpl ( noMerge() true + | RQUOTE_BAR_RBRACE x -> + lexbuf.CheckLanguageFeatureAndRecover LanguageFeature.BetterAnonymousRecordParsing lexbuf.LexemeRange + delayToken (pool.UseShiftedLocation(tokenTup, BAR_RBRACE, 1, 0)) + delayToken (pool.UseShiftedLocation(tokenTup, RQUOTE(x), 0, -2)) + pool.Return tokenTup + true + | _ -> false diff --git a/src/Compiler/lex.fsl b/src/Compiler/lex.fsl index 9abb9408c9e..c4aa041abc9 100644 --- a/src/Compiler/lex.fsl +++ b/src/Compiler/lex.fsl @@ -839,6 +839,10 @@ rule token (args: LexArgs) (skip: bool) = parse | "@@>" { checkExprOp lexbuf; RQUOTE ("<@@ @@>", true) } + | "@>|}" { RQUOTE_BAR_RBRACE ("<@ @>", false) } + + | "@@>|}" { RQUOTE_BAR_RBRACE ("<@@ @@>", true) } + | '#' { HASH } | '&' { AMP } diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 285a8a0c47e..c746cc32b8b 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -78,7 +78,7 @@ let parse_error_rich = Some(fun (ctxt: ParseErrorContext<_>) -> %token LET YIELD YIELD_BANG AND_BANG %token LESS GREATER /* here the bool indicates if the tokens are part of a type application or type parameter declaration, e.g. C, detected by the lex filter */ %token PERCENT_OP BINDER -%token LQUOTE RQUOTE RQUOTE_DOT +%token LQUOTE RQUOTE RQUOTE_DOT RQUOTE_BAR_RBRACE %token BAR_BAR UPCAST DOWNCAST NULL RESERVED MODULE NAMESPACE DELEGATE CONSTRAINT BASE %token AND AS ASSERT OASSERT ASR BEGIN DO DONE DOWNTO ELSE ELIF END DOT_DOT DOT_DOT_HAT %token EXCEPTION FALSE FOR FUN FUNCTION IF IN JOIN_IN FINALLY DO_BANG diff --git a/src/Compiler/xlf/FSStrings.cs.xlf b/src/Compiler/xlf/FSStrings.cs.xlf index cfa0c8bddb7..b7040399218 100644 --- a/src/Compiler/xlf/FSStrings.cs.xlf +++ b/src/Compiler/xlf/FSStrings.cs.xlf @@ -87,6 +87,11 @@ symbol '>|}' + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + interpolated string interpolovaný řetězec diff --git a/src/Compiler/xlf/FSStrings.de.xlf b/src/Compiler/xlf/FSStrings.de.xlf index e81e671661a..83242b1a2ed 100644 --- a/src/Compiler/xlf/FSStrings.de.xlf +++ b/src/Compiler/xlf/FSStrings.de.xlf @@ -107,6 +107,11 @@ Interpolierte Zeichenfolge (Teil) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' Schlüsselwort "while!" diff --git a/src/Compiler/xlf/FSStrings.es.xlf b/src/Compiler/xlf/FSStrings.es.xlf index 9e78f3ddd08..b874728926e 100644 --- a/src/Compiler/xlf/FSStrings.es.xlf +++ b/src/Compiler/xlf/FSStrings.es.xlf @@ -107,6 +107,11 @@ cadena interpolada (parte) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' palabra clave “while!” diff --git a/src/Compiler/xlf/FSStrings.fr.xlf b/src/Compiler/xlf/FSStrings.fr.xlf index ccedd3ac360..e6d9ea22b80 100644 --- a/src/Compiler/xlf/FSStrings.fr.xlf +++ b/src/Compiler/xlf/FSStrings.fr.xlf @@ -107,6 +107,11 @@ chaîne interpolée (partie) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' mot-clé « pendant ! » diff --git a/src/Compiler/xlf/FSStrings.it.xlf b/src/Compiler/xlf/FSStrings.it.xlf index e5545d56799..91edb4c9e53 100644 --- a/src/Compiler/xlf/FSStrings.it.xlf +++ b/src/Compiler/xlf/FSStrings.it.xlf @@ -107,6 +107,11 @@ stringa interpolata (parte) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' parola chiave "while" diff --git a/src/Compiler/xlf/FSStrings.ja.xlf b/src/Compiler/xlf/FSStrings.ja.xlf index 631370c20e9..af62fb0a030 100644 --- a/src/Compiler/xlf/FSStrings.ja.xlf +++ b/src/Compiler/xlf/FSStrings.ja.xlf @@ -107,6 +107,11 @@ 補間された文字列 (部分) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' キーワード 'while!' diff --git a/src/Compiler/xlf/FSStrings.ko.xlf b/src/Compiler/xlf/FSStrings.ko.xlf index 084e56072c4..d6eebed9afc 100644 --- a/src/Compiler/xlf/FSStrings.ko.xlf +++ b/src/Compiler/xlf/FSStrings.ko.xlf @@ -107,6 +107,11 @@ 보간 문자열(부분) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' 'while!' 키워드 diff --git a/src/Compiler/xlf/FSStrings.pl.xlf b/src/Compiler/xlf/FSStrings.pl.xlf index f6e7003e75d..cf4407fa898 100644 --- a/src/Compiler/xlf/FSStrings.pl.xlf +++ b/src/Compiler/xlf/FSStrings.pl.xlf @@ -107,6 +107,11 @@ ciąg interpolowany (część) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' słowo kluczowe „while!” diff --git a/src/Compiler/xlf/FSStrings.pt-BR.xlf b/src/Compiler/xlf/FSStrings.pt-BR.xlf index 72178364b24..80d7ede40c3 100644 --- a/src/Compiler/xlf/FSStrings.pt-BR.xlf +++ b/src/Compiler/xlf/FSStrings.pt-BR.xlf @@ -107,6 +107,11 @@ cadeia de caracteres interpolada (parte) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' palavra-chave "while!" diff --git a/src/Compiler/xlf/FSStrings.ru.xlf b/src/Compiler/xlf/FSStrings.ru.xlf index 6f2c47d0d10..28e040426d7 100644 --- a/src/Compiler/xlf/FSStrings.ru.xlf +++ b/src/Compiler/xlf/FSStrings.ru.xlf @@ -107,6 +107,11 @@ интерполированная строка (часть) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' ключевое слово "while!" diff --git a/src/Compiler/xlf/FSStrings.tr.xlf b/src/Compiler/xlf/FSStrings.tr.xlf index 0c41ee99672..8f81ede3df9 100644 --- a/src/Compiler/xlf/FSStrings.tr.xlf +++ b/src/Compiler/xlf/FSStrings.tr.xlf @@ -107,6 +107,11 @@ düz metin arasına kod eklenmiş dize (parça) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' 'while!' anahtar sözcüğü diff --git a/src/Compiler/xlf/FSStrings.zh-Hans.xlf b/src/Compiler/xlf/FSStrings.zh-Hans.xlf index dc22dbeb28b..21191e552c3 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hans.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hans.xlf @@ -107,6 +107,11 @@ 内插字符串(部分) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' 关键字 "while!" diff --git a/src/Compiler/xlf/FSStrings.zh-Hant.xlf b/src/Compiler/xlf/FSStrings.zh-Hant.xlf index bcb553c7de1..5f834c4e1ff 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hant.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hant.xlf @@ -107,6 +107,11 @@ 插補字串 (部分) + + symbol '@>|}' or '@@>|}' + symbol '@>|}' or '@@>|}' + + keyword 'while!' 關鍵字 'while!' diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs index ef0b307853a..be7d0bf7ee0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs @@ -506,4 +506,174 @@ let v = {| ``A`` = 0; B = 5; A = ""; B = 0 |} |> withDiagnostics [ (Error 3522, Line 2, Col 12, Line 2, Col 17, "The field 'A' appears multiple times in this record expression.") (Error 3522, Line 2, Col 23, Line 2, Col 24, "The field 'B' appears multiple times in this record expression.") - ] \ No newline at end of file + ] + + [] + let ``Preview: Anonymous records with typed quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let expr1 : {| A: Expr |} = {| A = <@ 1 + 1 @> |} +let expr2 : {| A: Expr |} = {| A = <@ 1 + 1 @>|} +let expr3 : {| A: Expr; B: Expr |} = {| A = <@ "hello" @>; B = <@ 42 @>|} +let expr4 : {| A: Expr; B: Expr |} = {| A = <@ "hello" @>; B = <@ 42 @>|} + +let expr5 : {| A: Expr |} = {| A= <@ 1 + 1 @> |} +let expr6 : {| A: Expr |} = {| A= <@ 1 + 1 @>|} +let expr7 : {| A: Expr |} = {| A = <@ 1 + 1 @> |} +let expr8 : {| A: Expr |} = {| A = <@ 1 + 1 @>|} + +let (=<@) = (@) +let (@>=) = (@) + +[1..2] =<@ [3..4] @>= [5..6] + """ + |> withLangVersionPreview + |> compile + |> shouldSucceed + + [] + let ``Preview: Anonymous records with untyped quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let expr1 : {| A: Expr |} = {| A = <@@ 1 + 1 @@> |} +let expr2 : {| A: Expr |} = {| A = <@@ 1 + 1 @@>|} +let expr3 : {| A: Expr; B: Expr |} = {| A = <@@ "hello" @@>; B = <@@ 42 @@>|} +let expr4 : {| A: Expr; B: Expr |} = {| A = <@@ "hello" @@>; B = <@@ 42 @@>|} + +let expr5 : {| A: Expr |} = {| A= <@@ 1 + 1 @@> |} +let expr6 : {| A: Expr |} = {| A= <@@ 1 + 1 @@>|} +let expr7 : {| A: Expr |} = {| A = <@@ 1 + 1 @@> |} +let expr8 : {| A: Expr |} = {| A = <@@ 1 + 1 @@>|} + """ + |> withLangVersionPreview + |> compile + |> shouldSucceed + + [] + let ``Preview: Anonymous records with mixed quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let expr : {| Typed: Expr; Untyped: Expr |} = + {| Typed = <@ 1 + 1 @>; Untyped = <@@ "test" @@>|} + +let expr2 : {| A: Expr; B: Expr; C: string |} = + {| A = <@ 42 @>; B = <@@ true @@>; C = "normal string"|} + """ + |> withLangVersionPreview + |> compile + |> shouldSucceed + + [] + let ``Preview: Nested anonymous records with quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let nested = + {| Outer = {| Inner = <@ 1 + 1 @>|}; Other = <@@ "test" @@>|} + +let nested2 : {| A: {| B: Expr |}; C: Expr |} = + {| A = {| B = <@ 42 @>|}; C = <@@ true @@>|} + """ + |> withLangVersionPreview + |> compile + |> shouldSucceed + + [] + let ``Version 9: Anonymous records with typed quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let expr1 : {| A: Expr |} = {| A = <@ 1 + 1 @> |} +let expr2 : {| A: Expr |} = {| A = <@ 1 + 1 @>|} +let expr3 : {| A: Expr; B: Expr |} = {| A = <@ "hello" @>; B = <@ 42 @>|} +let expr4 : {| A: Expr; B: Expr |} = {| A = <@ "hello" @>; B = <@ 42 @>|} + +let expr5 : {| A: Expr |} = {| A= <@ 1 + 1 @> |} +let expr6 : {| A: Expr |} = {| A= <@ 1 + 1 @>|} +let expr7 : {| A: Expr |} = {| A = <@ 1 + 1 @> |} +let expr8 : {| A: Expr |} = {| A = <@ 1 + 1 @>|} + +let (=<@) = (@) +let (@>=) = (@) + +[1..2] =<@ [3..4] @>= [5..6] + """ + |> withLangVersion90 + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 5, Col 48, Line 5, Col 49, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 6, Col 80, Line 6, Col 82, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 7, Col 80, Line 7, Col 82, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 10, Col 47, Line 10, Col 48, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 12, Col 48, Line 12, Col 49, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + + ] + + [] + let ``Version 9: Anonymous records with untyped quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let expr1 : {| A: Expr |} = {| A = <@@ 1 + 1 @@> |} +let expr2 : {| A: Expr |} = {| A = <@@ 1 + 1 @@>|} +let expr3 : {| A: Expr; B: Expr |} = {| A = <@@ "hello" @@>; B = <@@ 42 @@>|} +let expr4 : {| A: Expr; B: Expr |} = {| A = <@@ "hello" @@>; B = <@@ 42 @@>|} + +let expr5 : {| A: Expr |} = {| A= <@@ 1 + 1 @@> |} +let expr6 : {| A: Expr |} = {| A= <@@ 1 + 1 @@>|} +let expr7 : {| A: Expr |} = {| A = <@@ 1 + 1 @@> |} +let expr8 : {| A: Expr |} = {| A = <@@ 1 + 1 @@>|} + """ + |> withLangVersion90 + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 5, Col 44, Line 5, Col 45, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 6, Col 70, Line 6, Col 72, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 7, Col 70, Line 7, Col 72, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 10, Col 43, Line 10, Col 44, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 12, Col 44, Line 12, Col 45, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Version 9: Anonymous records with mixed quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let expr : {| Typed: Expr; Untyped: Expr |} = + {| Typed = <@ 1 + 1 @>; Untyped = <@@ "test" @@>|} + +let expr2 : {| A: Expr; B: Expr; C: string |} = + {| A = <@ 42 @>; B = <@@ true @@>; C = "normal string"|} + """ + |> withLangVersion90 + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 5, Col 50, Line 5, Col 55, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] + + [] + let ``Version 9: Nested anonymous records with quotations should parse correctly``() = + Fsx """ +open Microsoft.FSharp.Quotations + +let nested = + {| Outer = {| Inner = <@ 1 + 1 @>|}; Other = <@@ "test" @@>|} + +let nested2 : {| A: {| B: Expr |}; C: Expr |} = + {| A = {| B = <@ 42 @>|}; C = <@@ true @@>|} + """ + |> withLangVersion90 + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 3350, Line 5, Col 34, Line 5, Col 35, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 5, Col 61, Line 5, Col 66, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 8, Col 22, Line 8, Col 24, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + (Error 3350, Line 8, Col 44, Line 8, Col 49, "Feature 'Support for better anonymous record parsing' is not available in F# 9.0. Please use language version 'PREVIEW' or greater.") + ] 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 e2349c44c11..eaee5694bf7 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 @@ -11386,6 +11386,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Public FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 QuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 QuestionMarkQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Quote +FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 RQuoteBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Rec FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Reserved FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 RightArrow @@ -11583,6 +11584,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsPublic FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsQuestionMarkQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsQuote +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsRQuoteBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsRec FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsReserved FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsRightArrow @@ -11776,6 +11778,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsPublic() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsQuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsQuestionMarkQuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsQuote() +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsRQuoteBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsRec() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsReserved() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsRightArrow() @@ -11969,6 +11972,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind QuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind QuestionMarkQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Quote +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind RQuoteBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Rec FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Reserved FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind RightArrow @@ -12162,6 +12166,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_QuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_QuestionMarkQuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Quote() +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_RQuoteBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Rec() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Reserved() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_RightArrow() 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 e2349c44c11..eaee5694bf7 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 @@ -11386,6 +11386,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Public FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 QuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 QuestionMarkQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Quote +FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 RQuoteBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Rec FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Reserved FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 RightArrow @@ -11583,6 +11584,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsPublic FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsQuestionMarkQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsQuote +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsRQuoteBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsRec FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsReserved FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsRightArrow @@ -11776,6 +11778,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsPublic() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsQuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsQuestionMarkQuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsQuote() +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsRQuoteBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsRec() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsReserved() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsRightArrow() @@ -11969,6 +11972,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind QuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind QuestionMarkQuestionMark FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Quote +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind RQuoteBarRightBrace FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Rec FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Reserved FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind RightArrow @@ -12162,6 +12166,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_QuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_QuestionMarkQuestionMark() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Quote() +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_RQuoteBarRightBrace() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Rec() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Reserved() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_RightArrow() 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 625bad81a15..0cdc4d8a63e 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl @@ -24,11 +24,11 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo@3494-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@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@923-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@923-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@923-509::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@923-509::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@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-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@924-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@924-509::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-509::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-509::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. 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 2e1d5680e1d..4fcd5d91990 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -35,11 +35,11 @@ [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@1431-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]: : .$ServiceLexing+clo@923-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@923-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@923-509::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@923-509::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@923-509::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-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@924-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@924-509::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-509::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-509::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@2496-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. 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 7a20b934eef..fdc1720553c 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl @@ -23,11 +23,11 @@ [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@3494-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]: : .$ServiceLexing+clo@923-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@923-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@923-530::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@923-530::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@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-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@924-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@924-530::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-530::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-530::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. 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 b8f7bba8f5f..e12c9acca1d 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -34,11 +34,11 @@ [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@1431-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]: : .$ServiceLexing+clo@923-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@923-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@923-530::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@923-530::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@923-530::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-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@924-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@924-530::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-530::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-530::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@2496-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. diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs new file mode 100644 index 00000000000..317d2257fb0 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs @@ -0,0 +1,8 @@ +module Module + +{| A = <@ 1 + 1 @>|} + +{|A = <@ 1 + 1 @> |} + +{| A = <@ 1 + 1 @> |} + diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl new file mode 100644 index 00000000000..7f3dd8badf2 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl @@ -0,0 +1,68 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonRecd - Quotation 01.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (3,5--3,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (3,12--3,13)), Const (Int32 1, (3,10--3,11)), + (3,10--3,13)), Const (Int32 1, (3,14--3,15)), + (3,10--3,15)), false, (3,7--3,18)))], (3,0--3,20), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,20)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (5,4--5,5), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (5,11--5,12)), Const (Int32 1, (5,9--5,10)), + (5,9--5,12)), Const (Int32 1, (5,13--5,14)), + (5,9--5,14)), false, (5,6--5,17)))], (5,0--5,20), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,20)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (7,5--7,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (7,12--7,13)), Const (Int32 1, (7,10--7,11)), + (7,10--7,13)), Const (Int32 1, (7,14--7,15)), + (7,10--7,15)), false, (7,7--7,18)))], (7,0--7,21), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,21))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--7,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs new file mode 100644 index 00000000000..995c19c6de2 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs @@ -0,0 +1,7 @@ +module Module + +{| A = <@@ 1 + 1 @@>|} + +{|A = <@@ 1 + 1 @@> |} + +{| A = <@@ 1 + 1 @@> |} diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl new file mode 100644 index 00000000000..a17975ba1da --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl @@ -0,0 +1,68 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonRecd - Quotation 02.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (3,5--3,6), + Quote + (Ident op_QuotationUntyped, true, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (3,13--3,14)), Const (Int32 1, (3,11--3,12)), + (3,11--3,14)), Const (Int32 1, (3,15--3,16)), + (3,11--3,16)), false, (3,7--3,20)))], (3,0--3,22), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,22)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (5,4--5,5), + Quote + (Ident op_QuotationUntyped, true, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (5,12--5,13)), Const (Int32 1, (5,10--5,11)), + (5,10--5,13)), Const (Int32 1, (5,14--5,15)), + (5,10--5,15)), false, (5,6--5,19)))], (5,0--5,22), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,22)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (7,5--7,6), + Quote + (Ident op_QuotationUntyped, true, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (7,13--7,14)), Const (Int32 1, (7,11--7,12)), + (7,11--7,14)), Const (Int32 1, (7,15--7,16)), + (7,11--7,16)), false, (7,7--7,20)))], (7,0--7,23), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,23))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--7,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs new file mode 100644 index 00000000000..cb13fdbeb49 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs @@ -0,0 +1,7 @@ +module Module + +{| A = <@ 1 + 1 @>; B = <@@ "test" @@>|} + +{|A = <@ 1 + 1 @>; B = <@@ "test" @@> |} + +{| A = <@ 1 + 1 @>; B = <@@ "test" @@> |} diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl new file mode 100644 index 00000000000..91f4963b53c --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl @@ -0,0 +1,86 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonRecd - Quotation 03.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (3,5--3,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (3,12--3,13)), Const (Int32 1, (3,10--3,11)), + (3,10--3,13)), Const (Int32 1, (3,14--3,15)), + (3,10--3,15)), false, (3,7--3,18))); + (SynLongIdent ([B], [], [None]), Some (3,22--3,23), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (3,28--3,34)), (3,28--3,34)), + false, (3,24--3,38)))], (3,0--3,40), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,40)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (5,4--5,5), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (5,11--5,12)), Const (Int32 1, (5,9--5,10)), + (5,9--5,12)), Const (Int32 1, (5,13--5,14)), + (5,9--5,14)), false, (5,6--5,17))); + (SynLongIdent ([B], [], [None]), Some (5,21--5,22), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (5,27--5,33)), (5,27--5,33)), + false, (5,23--5,37)))], (5,0--5,40), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,40)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([A], [], [None]), Some (7,5--7,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (7,12--7,13)), Const (Int32 1, (7,10--7,11)), + (7,10--7,13)), Const (Int32 1, (7,14--7,15)), + (7,10--7,15)), false, (7,7--7,18))); + (SynLongIdent ([B], [], [None]), Some (7,22--7,23), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (7,28--7,34)), (7,28--7,34)), + false, (7,24--7,38)))], (7,0--7,41), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,41))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--7,41), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs new file mode 100644 index 00000000000..5972922e4c2 --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs @@ -0,0 +1,7 @@ +module Module + +{| Outer = {| Inner = <@ 1 @>|}; Other = <@@ "test" @@>|} + +{|Outer = {| Inner = <@ 1 @>|}; Other = <@@ "test" @@> |} + +{| Outer = {| Inner = <@ 1 @>|}; Other = <@@ "test" @@> |} diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl new file mode 100644 index 00000000000..5577001a81e --- /dev/null +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl @@ -0,0 +1,65 @@ +ImplFile + (ParsedImplFileInput + ("/root/Expression/AnonRecd - Quotation 04.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (AnonRecd + (false, None, + [(SynLongIdent ([Outer], [], [None]), Some (3,9--3,10), + AnonRecd + (false, None, + [(SynLongIdent ([Inner], [], [None]), Some (3,20--3,21), + Quote + (Ident op_Quotation, false, + Const (Int32 1, (3,25--3,26)), false, (3,22--3,29)))], + (3,11--3,31), { OpeningBraceRange = (3,11--3,13) })); + (SynLongIdent ([Other], [], [None]), Some (3,39--3,40), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (3,45--3,51)), (3,45--3,51)), + false, (3,41--3,55)))], (3,0--3,57), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,57)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([Outer], [], [None]), Some (5,8--5,9), + AnonRecd + (false, None, + [(SynLongIdent ([Inner], [], [None]), Some (5,19--5,20), + Quote + (Ident op_Quotation, false, + Const (Int32 1, (5,24--5,25)), false, (5,21--5,28)))], + (5,10--5,30), { OpeningBraceRange = (5,10--5,12) })); + (SynLongIdent ([Other], [], [None]), Some (5,38--5,39), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (5,44--5,50)), (5,44--5,50)), + false, (5,40--5,54)))], (5,0--5,57), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,57)); + Expr + (AnonRecd + (false, None, + [(SynLongIdent ([Outer], [], [None]), Some (7,9--7,10), + AnonRecd + (false, None, + [(SynLongIdent ([Inner], [], [None]), Some (7,20--7,21), + Quote + (Ident op_Quotation, false, + Const (Int32 1, (7,25--7,26)), false, (7,22--7,29)))], + (7,11--7,31), { OpeningBraceRange = (7,11--7,13) })); + (SynLongIdent ([Other], [], [None]), Some (7,39--7,40), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (7,45--7,51)), (7,45--7,51)), + false, (7,41--7,55)))], (7,0--7,58), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,58))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--7,58), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl index 93fd93c0088..ede1aa9a366 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl @@ -16,30 +16,12 @@ ImplFile (AnonRecd (false, None, [(SynLongIdent ([a], [], [None]), Some (5,4--5,5), - FromParseError - (Quote - (Ident op_Quotation, false, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_AtGreaterBar], [], - [Some (OriginalNotation "@>|")]), None, - (5,11--5,14)), Const (Int32 3, (5,9--5,10)), - (5,9--5,14)), - ArbitraryAfterError ("declExprInfix", (5,14--5,14)), - (5,9--5,14)), false, (5,6--5,15)), (5,6--5,15)))], - (5,0--5,15), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,15))], + Quote + (Ident op_Quotation, false, Const (Int32 3, (5,9--5,10)), + false, (5,6--5,13)))], (5,0--5,15), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,15))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] WarnDirectives = [] CodeComments = [] }, set [])) - -(5,11)-(5,14) parse error Unexpected token '@>|' or incomplete expression -(5,14)-(5,15) parse error Unexpected symbol '}' in quotation literal. Expected end of quotation or other token. -(5,6)-(5,8) parse error Unmatched '<@ @>' -(5,0)-(5,2) parse error Unmatched '{|'