From 9f9c0ec232476fc0e62d401739911a4f3b2692d5 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Fri, 19 Sep 2025 15:05:14 +0100 Subject: [PATCH 01/16] Parser: Update OBLOCKSEP token passing --- .../Checking/CheckRecordSyntaxHelpers.fs | 27 ++++++++------ .../Checking/CheckRecordSyntaxHelpers.fsi | 6 ++-- .../Checking/Expressions/CheckExpressions.fs | 7 ++-- src/Compiler/Service/ServiceParseTreeWalk.fs | 32 ++++++++--------- src/Compiler/SyntaxTree/SyntaxTree.fs | 17 ++++----- src/Compiler/SyntaxTree/SyntaxTree.fsi | 19 ++++------ src/Compiler/pars.fsy | 35 ++++++++++--------- ...iler.Service.SurfaceArea.netstandard20.bsl | 27 +++++--------- .../Expression/AnonymousRecords-01.fs.bsl | 17 +++++---- .../Expression/AnonymousRecords-06.fs.bsl | 2 +- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 2 +- .../Expression/InheritRecord - Field 1.fs.bsl | 7 ++-- .../Expression/InheritRecord - Field 2.fs.bsl | 7 ++-- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 4 +-- .../Expression/Record - Anon 03.fs.bsl | 4 +-- .../Expression/Record - Anon 04.fs.bsl | 2 +- .../Expression/Record - Anon 05.fs.bsl | 5 ++- .../Expression/Record - Anon 06.fs.bsl | 5 ++- .../Expression/Record - Anon 12.fs.bsl | 4 +-- .../Expression/Record - Field 08.fs.bsl | 3 +- .../Expression/Record - Field 09.fs.bsl | 3 +- .../Expression/Record - Field 13.fs.bsl | 3 +- .../Expression/Record - Field 14.fs.bsl | 3 +- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 3 +- .../SyntaxTree/Pattern/Named field 01.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 02.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 03.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 04.fs.bsl | 2 +- .../SyntaxTree/Pattern/Named field 05.fs.bsl | 4 +-- .../SyntaxTree/Pattern/Named field 06.fs.bsl | 4 +-- .../SyntaxTree/Pattern/Named field 07.fs.bsl | 4 +-- .../SyntaxTree/Pattern/Named field 08.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 02.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 07.fs.bsl | 4 +-- .../SynType/Typed LetBang AndBang 03.fs.bsl | 3 +- .../SynType/Typed LetBang AndBang 04.fs.bsl | 3 +- .../SynType/Typed LetBang AndBang 05.fs.bsl | 3 +- 37 files changed, 130 insertions(+), 151 deletions(-) diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs index c4836865f79..0ea75863a42 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs @@ -91,13 +91,14 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid withStartEnd origId.idRange.End id.idRange.Start origId.idRange match withExpr with - | SynExpr.Ident origId, (blockSep: BlockSeparator) -> + | SynExpr.Ident origId, Some(blockSep: BlockSeparator) -> let lid, rng = upToId blockSep.Range id (origId :: ids) - - Some( - SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), - BlockSeparator.Offside(blockSep.Range, None) - ) + Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), Some blockSep) + | SynExpr.Ident origId, None -> + // Synthesize a zero-width separator range at the end of the identifier when missing + let zero = origId.idRange.EndRange + let lid, rng = upToId zero id (origId :: ids) + Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), None) | _ -> None let rec synExprRecd copyInfo (outerFieldId: Ident) innerFields exprBeingAssigned = @@ -120,7 +121,13 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid AnonRecdTypeInfo.TupInfo = TupInfo.Const isStruct }) -> let fields = [ LongIdentWithDots([ fieldId ], []), None, nestedField ] - SynExpr.AnonRecd(isStruct, copyInfo outerFieldId, fields, outerFieldId.idRange, { OpeningBraceRange = range0 }) + // Pass through optional separator for anonymous records + let copyInfoAnon = + match copyInfo outerFieldId with + | Some(exprWhenWith, sepOpt) -> Some(exprWhenWith, sepOpt) + | None -> None + + SynExpr.AnonRecd(isStruct, copyInfoAnon, fields, outerFieldId.idRange, { OpeningBraceRange = range0 }) | _ -> let fields = [ @@ -153,11 +160,11 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid /// When the original expression in copy-and-update is more complex than `{ x with ... }`, like `{ f () with ... }`, /// we bind it first, so that it's not evaluated multiple times during a nested update -let BindOriginalRecdExpr (withExpr: SynExpr * BlockSeparator) mkRecdExpr = - let originalExpr, blockSep = withExpr +let BindOriginalRecdExpr (withExpr: SynExpr * BlockSeparator option) mkRecdExpr = + let originalExpr, blockSepOpt = withExpr let mOrigExprSynth = originalExpr.Range.MakeSynthetic() let id = mkSynId mOrigExprSynth "bind@" - let withExpr = SynExpr.Ident id, blockSep + let withExpr = SynExpr.Ident id, blockSepOpt let binding = mkSynBinding diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi index 5fb892abb2e..42dbce702ca 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi @@ -16,8 +16,10 @@ val TransformAstForNestedUpdates: overallTy: TType -> lid: LongIdent -> exprBeingAssigned: SynExpr -> - withExpr: SynExpr * BlockSeparator -> + withExpr: SynExpr * BlockSeparator option -> (Ident list * Ident) * SynExpr option val BindOriginalRecdExpr: - withExpr: SynExpr * BlockSeparator -> mkRecdExpr: ((SynExpr * BlockSeparator) option -> SynExpr) -> SynExpr + withExpr: SynExpr * BlockSeparator option -> + mkRecdExpr: ((SynExpr * BlockSeparator option) option -> SynExpr) -> + SynExpr diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 9aaf8d472a8..74816cddd3c 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -5898,7 +5898,8 @@ and TcExprUndelayed (cenv: cenv) (overallTy: OverallTy) env tpenv (synExpr: SynE TcAnonRecdExpr cenv overallTy env tpenv (isStruct, withExprOpt, unsortedFieldExprs, mWholeExpr) ) | Some withExpr -> - BindOriginalRecdExpr withExpr (fun withExpr -> SynExpr.AnonRecd (isStruct, withExpr, unsortedFieldExprs, mWholeExpr, trivia)) + BindOriginalRecdExpr withExpr (fun withExprOpt -> + SynExpr.AnonRecd (isStruct, withExprOpt, unsortedFieldExprs, mWholeExpr, trivia)) |> TcExpr cenv overallTy env tpenv | SynExpr.ArrayOrList (isArray, args, m) -> @@ -7907,7 +7908,7 @@ and TcNewAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, unsortedField mkAnonRecd g mWholeExpr anonInfo unsortedFieldIds unsortedCheckedArgs unsortedFieldTys, tpenv -and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (origExpr, blockSeparator), unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = +and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (origExpr, blockSeparatorOpt), unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = // The fairly complex case '{| origExpr with X = 1; Y = 2 |}' // The origExpr may be either a record or anonymous record. // The origExpr may be either a struct or not. @@ -7933,7 +7934,7 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or match synLongIdent.LongIdent with | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), mWholeExpr)) | [ id ] -> ([], id), Some exprBeingAssigned - | lid -> TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparator)) + | lid -> TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparatorOpt)) |> GroupUpdatesToNestedFields let unsortedFieldSynExprsGiven = unsortedFieldIdsAndSynExprsGiven |> List.choose snd diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index 3c0e6bff76a..7846593fab8 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -445,7 +445,7 @@ module SyntaxTraversal = | SynExpr.AnonRecd(copyInfo = copyOpt; recordFields = fields) -> [ match copyOpt with - | Some(expr, blockSep) -> + | Some(expr, Some blockSep) -> yield dive expr expr.Range traverseSynExpr yield @@ -456,6 +456,9 @@ module SyntaxTraversal = visitor.VisitRecordField(path, Some expr, None) else None) + | Some(expr, None) -> + // No explicit separator (implicit OBLOCKSEP). Still dive into expr. + yield dive expr expr.Range traverseSynExpr | _ -> () for field, _, x in fields do @@ -466,19 +469,11 @@ module SyntaxTraversal = | SynExpr.Record(baseInfo = inheritOpt; copyInfo = copyOpt; recordFields = fields) -> [ - let diveIntoSeparator offsideColumn scPosOpt copyOpt = - match scPosOpt with - | Some scPos -> - if posGeq pos scPos then - visitor.VisitRecordField(path, copyOpt, None) // empty field after the inherits - else - None - | None -> - //semicolon position is not available - use offside rule - if pos.Column = offsideColumn then - visitor.VisitRecordField(path, copyOpt, None) // empty field after the inherits - else - None + let diveIntoSeparator scPos copyOpt = + if posGeq pos scPos then + visitor.VisitRecordField(path, copyOpt, None) // empty field after the inherits + else + None match inheritOpt with | Some(_ty, expr, _range, sepOpt, inheritRange) -> @@ -505,12 +500,12 @@ module SyntaxTraversal = // inherit A() // $ // field1 = 5 - diveIntoSeparator inheritRange.StartColumn blockSep.Position None) + diveIntoSeparator blockSep.Position None) | None -> () | _ -> () match copyOpt with - | Some(expr, blockSep) -> + | Some(expr, Some blockSep) -> yield dive expr expr.Range traverseSynExpr yield @@ -521,6 +516,9 @@ module SyntaxTraversal = visitor.VisitRecordField(path, Some expr, None) else None) + | Some(expr, None) -> + // No explicit separator (implicit OBLOCKSEP). Still dive into expr. + yield dive expr expr.Range traverseSynExpr | _ -> () let copyOpt = Option.map fst copyOpt @@ -563,7 +561,7 @@ module SyntaxTraversal = // field1 = 5 // $ // field2 = 5 - diveIntoSeparator offsideColumn blockSep.Position copyOpt) + diveIntoSeparator blockSep.Position copyOpt) | _ -> () ] diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 8db7131d65e..115f0a61878 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -308,21 +308,18 @@ type SeqExprOnly = SeqExprOnly of bool [] type BlockSeparator = - | Semicolon of range: range * position: pos option - | Comma of range: range * position: pos option - | Offside of range: range * position: pos option + | Semicolon of range: range * position: pos + | Comma of range: range * position: pos member this.Range = match this with | Semicolon(range = m) - | Comma(range = m) - | Offside(range = m) -> m + | Comma(range = m) -> m member this.Position = match this with - | Semicolon(position = p) - | Comma(position = p) - | Offside(position = p) -> p + | Semicolon(position = p) -> p + | Comma(position = p) -> p type RecordFieldName = SynLongIdent * bool @@ -549,7 +546,7 @@ type SynExpr = | AnonRecd of isStruct: bool * - copyInfo: (SynExpr * BlockSeparator) option * + copyInfo: (SynExpr * BlockSeparator option) option * recordFields: (SynLongIdent * range option * SynExpr) list * range: range * trivia: SynExprAnonRecdTrivia @@ -558,7 +555,7 @@ type SynExpr = | Record of baseInfo: (SynType * SynExpr * range * BlockSeparator option * range) option * - copyInfo: (SynExpr * BlockSeparator) option * + copyInfo: (SynExpr * BlockSeparator option) option * recordFields: SynExprRecordField list * range: range diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 873e8201d1f..a60daaee481 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -359,21 +359,16 @@ type SeqExprOnly = type BlockSeparator = /// A separator consisting of a semicolon ';' /// range is the range of the semicolon - /// position is the position of the semicolon (if available) - | Semicolon of range: range * position: pos option + /// position is the position of the semicolon + | Semicolon of range: range * position: pos /// A separator consisting of a comma ',' /// range is the range of the comma - /// position is the position of the comma (if available) - | Comma of range: range * position: pos option - - // A separator consisting of a newline - /// range is the range of the newline - /// position is the position of the newline (if available) - | Offside of range: range * position: pos option + /// position is the position of the comma + | Comma of range: range * position: pos member Range: range - member Position: pos option + member Position: pos /// Represents a record field name plus a flag indicating if given record field name is syntactically /// correct and can be used in name resolution. @@ -607,7 +602,7 @@ type SynExpr = /// F# syntax: struct {| id1=e1; ...; idN=eN |} | AnonRecd of isStruct: bool * - copyInfo: (SynExpr * BlockSeparator) option * + copyInfo: (SynExpr * BlockSeparator option) option * recordFields: (SynLongIdent * range option * SynExpr) list * range: range * trivia: SynExprAnonRecdTrivia @@ -621,7 +616,7 @@ type SynExpr = /// every field includes range of separator after the field (for tooling) | Record of baseInfo: (SynType * SynExpr * range * BlockSeparator option * range) option * - copyInfo: (SynExpr * BlockSeparator) option * + copyInfo: (SynExpr * BlockSeparator option) option * recordFields: SynExprRecordField list * range: range diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index b773f1ea1ac..00b09a32c4e 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3668,14 +3668,13 @@ namePatPairs: { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range let lid = SynLongIdent([id], [], [None]) - NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } + NamePatPairField(lid, mEq, m, pat, $2) :: $3 } | namePatPair seps_block seps_block namePatPairs - { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) - let (id: Ident), mEq, (pat: SynPat) = $1 + { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range let lid = SynLongIdent([id], [], [None]) - NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } + NamePatPairField(lid, mEq, m, pat, $2) :: $4 } namePatPair: | ident EQUALS parenPattern @@ -4016,13 +4015,13 @@ recordPatternElementsAux: | recordPatternElement seps_block recordPatternElementsAux { let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range - NamePatPairField(lid, mEq, m, pat, Some $2) :: $3 } + NamePatPairField(lid, mEq, m, pat, $2) :: $3 } | recordPatternElement seps_block seps_block recordPatternElementsAux { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectingPattern ()) let (lid: SynLongIdent), mEq, (pat: SynPat) = $1 let m = unionRanges lid.Range pat.Range - NamePatPairField(lid, mEq, m, pat, Some $2) :: $4 } + NamePatPairField(lid, mEq, m, pat, $2) :: $4 } recordPatternElement: | path EQUALS parenPattern @@ -5709,7 +5708,7 @@ recdExprCore: | appExpr { let mExpr = rhs parseState 1 reportParseErrorAt mExpr (FSComp.SR.parsFieldBinding ()) - Some($1, BlockSeparator.Offside(mExpr.EndRange, None)), [] } + (Some($1, None), []) } /* handles cases when identifier can start from the underscore @@ -5743,36 +5742,40 @@ recdExprCore: | appExpr WITH recdBinding recdExprBindings opt_seps_block { let l = List.rev $4 let l = rebindRanges $3 l $5 - (Some($1, BlockSeparator.Offside(rhs parseState 2, None)), l) } + (Some($1, $5), l) } | appExpr OWITH opt_seps_block OEND - { (Some($1, BlockSeparator.Offside(rhs parseState 2, None)), []) } + { (Some($1, $3), []) } | appExpr OWITH recdBinding recdExprBindings opt_seps_block OEND { let l = List.rev $4 let l = rebindRanges $3 l $5 - (Some($1, BlockSeparator.Offside(rhs parseState 2, None)), l) } + (Some($1, $5), l) } opt_seps_block: | seps_block - { Some $1 } + { $1 } | /* EMPTY */ { None } seps_block: | OBLOCKSEP - { BlockSeparator.Offside((rhs parseState 1), None) } + { + // OBLOCKSEP is purely syntactic: do not produce a BlockSeparator value + // Treat it as absence of an explicit separator + None + } | SEMICOLON { let m = (rhs parseState 1) - BlockSeparator.Semicolon(m, Some m.End) } + Some (BlockSeparator.Semicolon(m, m.End)) } | SEMICOLON OBLOCKSEP - { BlockSeparator.Semicolon((rhs2 parseState 1 2), Some (rhs parseState 1).End) } + { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2), (rhs parseState 1).End)) } | OBLOCKSEP SEMICOLON - { BlockSeparator.Semicolon((rhs2 parseState 1 2), Some (rhs parseState 2).End) } + { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2), (rhs parseState 2).End)) } /* identifier can start from the underscore */ @@ -5787,7 +5790,7 @@ pathOrUnderscore : recdExprBindings: | recdExprBindings seps_block recdBinding - { ($3, Some $2) :: $1 } + { ($3, $2) :: $1 } | /* EMPTY */ { [] } diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl index 161933e9c16..30810097d79 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl @@ -2081,8 +2081,8 @@ FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: FSharp.Compiler.Text.Range[ FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.CodeAnalysis.FSharpSymbolUse] GetSymbolUsesAtLocation(Int32, Int32, System.String, Microsoft.FSharp.Collections.FSharpList`1[System.String]) FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.CodeAnalysis.FSharpSymbolUse]] GetDeclarationListSymbols(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.FSharpParseFileResults], Int32, System.String, FSharp.Compiler.EditorServices.PartialLongName, Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.EditorServices.AssemblySymbol]]], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.CodeAnalysis.FSharpSymbolUse] GetSymbolUseAtLocation(Int32, Int32, System.String, Microsoft.FSharp.Collections.FSharpList`1[System.String]) -FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpDisplayContext] TryGetCapturedDisplayContext(FSharp.Compiler.Text.Range) FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpDisplayContext] GetDisplayContextForPos(FSharp.Compiler.Text.Position) +FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpDisplayContext] TryGetCapturedDisplayContext(FSharp.Compiler.Text.Range) FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpImplementationFileContents] ImplementationFile FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpImplementationFileContents] get_ImplementationFile() FSharp.Compiler.CodeAnalysis.FSharpCheckFileResults: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpType] TryGetCapturedType(FSharp.Compiler.Text.Range) @@ -5919,40 +5919,31 @@ FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 GetHashCode(System.Collections.IEqua FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 Tag FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 get_Tag() FSharp.Compiler.Symbols.FSharpXmlDoc: System.String ToString() +FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Position get_position() +FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Position position FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.BlockSeparator+Comma: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] get_position() -FSharp.Compiler.Syntax.BlockSeparator+Comma: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] position -FSharp.Compiler.Syntax.BlockSeparator+Offside: FSharp.Compiler.Text.Range get_range() -FSharp.Compiler.Syntax.BlockSeparator+Offside: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.BlockSeparator+Offside: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] get_position() -FSharp.Compiler.Syntax.BlockSeparator+Offside: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] position +FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Position get_position() +FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Position position FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.BlockSeparator+Semicolon: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] get_position() -FSharp.Compiler.Syntax.BlockSeparator+Semicolon: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] position FSharp.Compiler.Syntax.BlockSeparator+Tags: Int32 Comma -FSharp.Compiler.Syntax.BlockSeparator+Tags: Int32 Offside FSharp.Compiler.Syntax.BlockSeparator+Tags: Int32 Semicolon FSharp.Compiler.Syntax.BlockSeparator: Boolean IsComma -FSharp.Compiler.Syntax.BlockSeparator: Boolean IsOffside FSharp.Compiler.Syntax.BlockSeparator: Boolean IsSemicolon FSharp.Compiler.Syntax.BlockSeparator: Boolean get_IsComma() -FSharp.Compiler.Syntax.BlockSeparator: Boolean get_IsOffside() FSharp.Compiler.Syntax.BlockSeparator: Boolean get_IsSemicolon() -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewComma(FSharp.Compiler.Text.Range, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]) -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewOffside(FSharp.Compiler.Text.Range, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]) -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewSemicolon(FSharp.Compiler.Text.Range, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]) +FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewComma(FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Position) +FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewSemicolon(FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Position) FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator+Comma -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator+Offside FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator+Semicolon FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator+Tags +FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Position Position +FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Position get_Position() FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Range Range FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Range get_Range() FSharp.Compiler.Syntax.BlockSeparator: Int32 Tag FSharp.Compiler.Syntax.BlockSeparator: Int32 get_Tag() -FSharp.Compiler.Syntax.BlockSeparator: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] Position -FSharp.Compiler.Syntax.BlockSeparator: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position] get_Position() FSharp.Compiler.Syntax.BlockSeparator: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtDo FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtInvisible diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl index 292574469cd..817ef5b3eac 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl @@ -26,17 +26,16 @@ ImplFile (4,0--4,12)); Expr (AnonRecd - (false, Some (Null (5,3--5,7), Offside ((5,7--5,7), None)), [], - (5,0--5,10), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,10)); + (false, Some (Null (5,3--5,7), None), [], (5,0--5,10), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,10)); Expr (AnonRecd - (true, Some (Null (6,10--6,14), Offside ((6,14--6,14), None)), - [], (6,0--6,17), { OpeningBraceRange = (6,7--6,9) }), - (6,0--6,17))], PreXmlDocEmpty, [], None, (1,0--6,17), - { LeadingKeyword = None })], (true, true), - { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + (true, Some (Null (6,10--6,14), None), [], (6,0--6,17), + { OpeningBraceRange = (6,7--6,9) }), (6,0--6,17))], + PreXmlDocEmpty, [], None, (1,0--6,17), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) (5,3)-(5,7) parse error Field bindings must have the form 'id = expr;' (6,10)-(6,14) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl index 28d315f97af..64f783a7822 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl @@ -19,7 +19,7 @@ ImplFile Pats [Named (SynIdent (x, None), false, None, (1,6--1,7))], None, (1,4--1,7)), None, AnonRecd - (false, Some (Ident x, Offside ((1,15--1,19), None)), + (false, Some (Ident x, None), [(SynLongIdent ([R; D], [(1,21--1,22)], [None; None]), Some (1,24--1,25), Const (String ("s", Regular, (1,26--1,29)), (1,26--1,29))); diff --git a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index ae72ef621a1..054fad609d3 100644 --- a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -9,7 +9,7 @@ ImplFile false, AnonModule, [Expr (Record - (None, Some (Ident foo, Offside ((2,6--2,10), None)), + (None, Some (Ident foo, None), [SynExprRecordField ((SynLongIdent ([X], [], [None]), true), Some (4,12--4,13), Some (Const (Int32 12, (5,16--5,18))), (3,8--5,18), None)], diff --git a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl index 66f8567e0bf..4fec61e7b70 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl @@ -39,12 +39,11 @@ ImplFile Const (String ("message", Regular, (6,4--6,13)), (6,4--6,13)), (4,4--6,13)), (3,19--3,20), - Some (7,2--7,3), (3,19--7,3)), (3,10--7,3), - Some (Offside ((7,4--8,2), None)), (3,2--3,9)), None, + Some (7,2--7,3), (3,19--7,3)), (3,10--7,3), None, + (3,2--3,9)), None, [SynExprRecordField ((SynLongIdent ([X], [], [None]), true), Some (8,4--8,5), - Some (Const (Int32 42, (8,6--8,8))), (8,2--8,8), - Some (Offside ((8,9--9,2), None))); + Some (Const (Int32 42, (8,6--8,8))), (8,2--8,8), None); SynExprRecordField ((SynLongIdent ([Y], [], [None]), true), Some (9,4--9,5), Some diff --git a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl index db7a1b1d407..0a376af4ea5 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl @@ -12,19 +12,18 @@ ImplFile (Const (String ("test", Regular, (4,22--4,28)), (4,22--4,28)), (4,21--4,22), Some (4,28--4,29), (4,21--4,29)), - (4,12--4,29), Some (Offside ((4,30--5,4), None)), - (4,4--4,11)), None, + (4,12--4,29), None, (4,4--4,11)), None, [SynExprRecordField ((SynLongIdent ([Field1], [], [None]), true), Some (5,11--5,12), Some (Const (Int32 1, (5,13--5,14))), - (5,4--5,14), Some (Offside ((5,15--6,4), None))); + (5,4--5,14), None); SynExprRecordField ((SynLongIdent ([Field2], [], [None]), true), Some (6,11--6,12), Some (Const (String ("two", Regular, (6,13--6,18)), (6,13--6,18))), - (6,4--6,18), Some (Offside ((6,19--7,4), None))); + (6,4--6,18), None); SynExprRecordField ((SynLongIdent ([Field3], [], [None]), true), Some (7,11--7,12), Some (Const (Double 3.0, (7,13--7,16))), diff --git a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index 469e86f6c72..34e4bc06fff 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -14,12 +14,12 @@ ImplFile (LongIdent (SynLongIdent ([Exception], [], [None])), Paren (Ident msg, (2,19--2,20), Some (2,23--2,24), (2,19--2,24)), - (2,10--2,24), Some (Semicolon ((2,24--2,25), Some (2,25))), + (2,10--2,24), Some (Semicolon ((2,24--2,25), (2,25))), (2,2--2,9)), None, [SynExprRecordField ((SynLongIdent ([X], [], [None]), true), Some (2,28--2,29), Some (Const (Int32 1, (2,30--2,31))), (2,26--2,31), - Some (Semicolon ((2,31--2,32), Some (2,32))))], (2,0--2,34)), + Some (Semicolon ((2,31--2,32), (2,32))))], (2,0--2,34)), (2,0--2,34))], PreXmlDocEmpty, [], None, (2,0--2,34), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl index 37a155886f5..11a3ed9f18b 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl @@ -6,8 +6,8 @@ ImplFile ([Module], false, NamedModule, [Expr (AnonRecd - (false, Some (Ident F, Offside ((3,4--3,4), None)), [], - (3,0--3,7), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,7))], + (false, Some (Ident F, None), [], (3,0--3,7), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,7))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl index b053ae70070..32f4587f6de 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl @@ -10,7 +10,7 @@ ImplFile Some (App (Atomic, false, Ident f, Const (Unit, (3,4--3,6)), - (3,3--3,6)), Offside ((3,6--3,6), None)), [], (3,0--3,9), + (3,3--3,6)), None), [], (3,0--3,9), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,9))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl index d8e208340b3..b29469dfd32 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl @@ -11,9 +11,8 @@ ImplFile (DiscardAfterMissingQualificationAfterDot (App (Atomic, false, Ident f, Const (Unit, (3,4--3,6)), - (3,3--3,6)), (3,6--3,7), (3,3--3,7)), - Offside ((3,10--3,10), None)), [], (3,0--3,10), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,10))], + (3,3--3,6)), (3,6--3,7), (3,3--3,7)), None), [], + (3,0--3,10), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl index 0ddc72306ea..2c2d232d1e2 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl @@ -12,9 +12,8 @@ ImplFile (App (Atomic, false, Ident f, Const (Unit, (3,4--3,6)), (3,3--3,6)), (3,6--3,7), - SynLongIdent ([F], [], [None]), (3,3--3,8)), - Offside ((3,8--3,8), None)), [], (3,0--3,11), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,11))], + SynLongIdent ([F], [], [None]), (3,3--3,8)), None), [], + (3,0--3,11), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,11))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl index a7c940a25bf..7a6e68ba867 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl @@ -6,8 +6,8 @@ ImplFile ([Module], false, NamedModule, [Expr (AnonRecd - (false, Some (Ident F1, Offside ((3,5--3,5), None)), [], - (3,0--3,5), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,5)); + (false, Some (Ident F1, None), [], (3,0--3,5), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,5)); Expr (App (NonAtomic, false, diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl index 41296da9413..aa26d5f1d81 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl @@ -9,8 +9,7 @@ ImplFile (None, None, [SynExprRecordField ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), - Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), - Some (Offside ((3,8--4,2), None))); + Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), None); SynExprRecordField ((SynLongIdent ([B], [(4,3--4,4)], [None]), true), None, None, (4,2--4,4), None)], (3,0--4,6)), (3,0--4,6))], diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl index e708ec9ae41..105c3682a5f 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl @@ -9,8 +9,7 @@ ImplFile (None, None, [SynExprRecordField ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), - Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), - Some (Offside ((3,8--4,2), None))); + Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), None); SynExprRecordField ((SynLongIdent ([B], [], [None]), true), None, None, (4,2--4,3), None)], (3,0--4,5)), (3,0--4,5))], diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl index 8fd66a2e450..42361cf3739 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl @@ -9,8 +9,7 @@ ImplFile (None, None, [SynExprRecordField ((SynLongIdent ([F1], [], [None]), true), Some (3,5--3,6), - Some (Const (Int32 1, (3,7--3,8))), (3,2--3,8), - Some (Offside ((3,9--4,2), None))); + Some (Const (Int32 1, (3,7--3,8))), (3,2--3,8), None); SynExprRecordField ((SynLongIdent ([F2], [], [None]), true), Some (4,5--4,6), None, (4,2--4,6), None)], (3,0--4,8)), (3,0--4,8))], diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl index ec1319fc5ec..4796cc9a9d6 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl @@ -9,8 +9,7 @@ ImplFile (None, None, [SynExprRecordField ((SynLongIdent ([F1], [], [None]), true), Some (3,5--3,6), - Some (Const (Int32 1, (3,7--3,8))), (3,2--3,8), - Some (Offside ((3,9--4,2), None))); + Some (Const (Int32 1, (3,7--3,8))), (3,2--3,8), None); SynExprRecordField ((SynLongIdent ([F2], [], [None]), true), Some (4,5--4,6), Some diff --git a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index 97dede5c71b..e97685aa2e5 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -12,8 +12,7 @@ ImplFile (None, None, [SynExprRecordField ((SynLongIdent ([V], [], [None]), true), Some (2,4--2,5), - Some (Ident v), (2,2--2,7), - Some (Offside ((2,8--3,2), None))); + Some (Ident v), (2,2--2,7), None); SynExprRecordField ((SynLongIdent ([X], [], [None]), true), Some (3,9--3,10), Some diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl index 5b9122a199f..88e955dc24f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), Some (4,10)))); + Some (Semicolon ((4,9--4,10), (4,10)))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), (4,11--4,16), Wild (4,15--4,16), None)], diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl index 0d1885f7d54..2c4fc58c8c7 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), Some (4,10)))); + Some (Semicolon ((4,9--4,10), (4,10)))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), (4,11--4,14), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 9e8aafe9bb9..22f21885960 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), Some (4,10)))); + Some (Semicolon ((4,9--4,10), (4,10)))); NamePatPairField (SynLongIdent ([b], [], [None]), None, (4,11--4,12), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl index baa51abedd1..846ad8f2ef7 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), Some (4,10))))], + Some (Semicolon ((4,9--4,10), (4,10))))], (4,4--4,10), { ParenRange = (4,3--4,11) }), None, (4,2--4,11)), None, Const (Int32 2, (4,15--4,16)), (4,2--4,16), Yes, { ArrowRange = Some (4,12--4,14) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index 9218ee15428..ce5277b0664 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), Some (4,10)))); + Some (Semicolon ((4,9--4,10), (4,10)))); NamePatPairField (SynLongIdent ([c], [], [None]), Some (4,15--4,16), (4,13--4,18), Wild (4,17--4,18), None)], @@ -28,5 +28,3 @@ ImplFile { ConditionalDirectives = [] WarnDirectives = [] CodeComments = [] }, set [])) - -(4,11)-(4,12) parse error Expecting pattern diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl index 6634655039e..8faaa9d384f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl @@ -15,13 +15,13 @@ ImplFile (4,4--4,9), Named (SynIdent (a, None), false, None, (4,8--4,9)), - Some (Semicolon ((4,9--4,10), Some (4,10)))); + Some (Semicolon ((4,9--4,10), (4,10)))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), (4,11--4,16), Named (SynIdent (b, None), false, None, (4,15--4,16)), - Some (Semicolon ((4,16--4,17), Some (4,17)))); + Some (Semicolon ((4,16--4,17), (4,17)))); NamePatPairField (SynLongIdent ([c], [], [None]), Some (4,20--4,21), (4,18--4,23), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl index 7cd75852c85..d85a49dbb6c 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl @@ -19,11 +19,11 @@ ImplFile ([Foo; Bar; A], [(4,7--4,8); (4,11--4,12)], [None; None; None]), Some (4,14--4,15), (4,4--4,17), Const (Int32 1, (4,16--4,17)), - Some (Semicolon ((4,17--4,18), Some (4,18)))); + Some (Semicolon ((4,17--4,18), (4,18)))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,21--4,22), (4,19--4,24), Const (Int32 2, (4,23--4,24)), - Some (Semicolon ((4,24--4,25), Some (4,25)))); + Some (Semicolon ((4,24--4,25), (4,25)))); NamePatPairField (SynLongIdent ([C], [], [None]), Some (4,28--4,29), (4,26--4,31), Const (Int32 3, (4,30--4,31)), None)], diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl index b8b80218a0c..0f2a667f2ee 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl @@ -17,7 +17,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([A], [], [None]), None, (4,4--4,5), FromParseError (Wild (4,5--4,5), (4,5--4,5)), - Some (Semicolon ((4,6--4,7), Some (4,7)))); + Some (Semicolon ((4,6--4,7), (4,7)))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,10--4,11), (4,8--4,13), Const (Int32 3, (4,12--4,13)), None)], diff --git a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl index 3e837b4c5cd..5064b4b9d5e 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl @@ -11,7 +11,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), Some (4,10)))); + Some (Semicolon ((4,9--4,10), (4,10)))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,13--4,14), (4,11--4,16), Wild (4,15--4,16), None)], (4,2--4,18)), diff --git a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl index a824ecf2944..21347bba449 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl @@ -11,11 +11,11 @@ ImplFile ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), (4,4--4,9), Const (Int32 1, (4,8--4,9)), - Some (Semicolon ((4,9--4,10), Some (4,10)))); + Some (Semicolon ((4,9--4,10), (4,10)))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,13--4,14), (4,11--4,16), Const (Int32 2, (4,15--4,16)), - Some (Semicolon ((4,16--4,17), Some (4,17)))); + Some (Semicolon ((4,16--4,17), (4,17)))); NamePatPairField (SynLongIdent ([C], [], [None]), Some (4,20--4,21), (4,18--4,23), Const (Int32 3, (4,22--4,23)), None)], diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl index a9778cbe5ff..69c6077510e 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl @@ -26,8 +26,7 @@ ImplFile Named (SynIdent (name, None), false, None, (4,19--4,23)), - Some - (Semicolon ((4,23--4,24), Some (4,24)))); + Some (Semicolon ((4,23--4,24), (4,24)))); NamePatPairField (SynLongIdent ([Age], [], [None]), Some (4,29--4,30), (4,25--4,34), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl index a936ce2f58c..e1de7829929 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl @@ -25,8 +25,7 @@ ImplFile Named (SynIdent (name, None), false, None, (4,18--4,22)), - Some - (Semicolon ((4,22--4,23), Some (4,23)))); + Some (Semicolon ((4,22--4,23), (4,23)))); NamePatPairField (SynLongIdent ([Age], [], [None]), Some (4,28--4,29), (4,24--4,33), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl index 4efb606e0ec..4f2aa606d54 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl @@ -26,8 +26,7 @@ ImplFile Named (SynIdent (name, None), false, None, (4,19--4,23)), - Some - (Semicolon ((4,23--4,24), Some (4,24)))); + Some (Semicolon ((4,23--4,24), (4,24)))); NamePatPairField (SynLongIdent ([Age], [], [None]), Some (4,29--4,30), (4,25--4,34), From 8347ba2361c52bb9e3274fc1f0d4e90ef8133179 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Fri, 19 Sep 2025 23:57:50 +0100 Subject: [PATCH 02/16] baselines --- ...rp.Compiler.Service.SurfaceArea.netstandard20.bsl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl index 30810097d79..f312e981ab7 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl @@ -7015,8 +7015,8 @@ FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynLongIdent,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynExpr]] get_recordFields() FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynLongIdent,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynExpr]] recordFields -FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Syntax.BlockSeparator]] copyInfo -FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Syntax.BlockSeparator]] get_copyInfo() +FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]] copyInfo +FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]] get_copyInfo() FSharp.Compiler.Syntax.SynExpr+App: Boolean get_isInfix() FSharp.Compiler.Syntax.SynExpr+App: Boolean isInfix FSharp.Compiler.Syntax.SynExpr+App: FSharp.Compiler.Syntax.ExprAtomicFlag flag @@ -7413,8 +7413,8 @@ FSharp.Compiler.Syntax.SynExpr+Record: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Record: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordField] get_recordFields() FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordField] recordFields -FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Syntax.BlockSeparator]] copyInfo -FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Syntax.BlockSeparator]] get_copyInfo() +FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]] copyInfo +FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]] get_copyInfo() FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Syntax.SynType,FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator],FSharp.Compiler.Text.Range]] baseInfo FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Syntax.SynType,FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator],FSharp.Compiler.Text.Range]] get_baseInfo() FSharp.Compiler.Syntax.SynExpr+Sequential: Boolean get_isTrueSeq() @@ -7763,7 +7763,7 @@ FSharp.Compiler.Syntax.SynExpr: Boolean get_IsWhileBang() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsYieldOrReturn() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsYieldOrReturnFrom() FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAddressOf(Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAnonRecd(Boolean, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Syntax.BlockSeparator]], Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynLongIdent,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynExpr]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAnonRecd(Boolean, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]], Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynLongIdent,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynExpr]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewApp(FSharp.Compiler.Syntax.ExprAtomicFlag, Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewArbitraryAfterError(System.String, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewArrayOrList(Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr], FSharp.Compiler.Text.Range) @@ -7814,7 +7814,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewNull(FSharp.Co FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewObjExpr(FSharp.Compiler.Syntax.SynType, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.Ident]]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynMemberDefn], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynInterfaceImpl], FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewParen(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewQuote(FSharp.Compiler.Syntax.SynExpr, Boolean, FSharp.Compiler.Syntax.SynExpr, Boolean, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewRecord(Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Syntax.SynType,FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator],FSharp.Compiler.Text.Range]], Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Syntax.BlockSeparator]], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordField], FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewRecord(Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Syntax.SynType,FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator],FSharp.Compiler.Text.Range]], Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordField], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewSequential(FSharp.Compiler.Syntax.DebugPointAtSequential, Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprSequentialTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewSequentialOrImplicitYield(FSharp.Compiler.Syntax.DebugPointAtSequential, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewSet(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) From 3e1a3c7c5d5d86955e4a57ccd2be0228bb57c632 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 00:22:19 +0100 Subject: [PATCH 03/16] Reduce diff --- .../Checking/CheckRecordSyntaxHelpers.fs | 29 ++++++++++++------- .../Checking/Expressions/CheckExpressions.fs | 7 ++--- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs index 0ea75863a42..19f1ccc11fb 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs @@ -90,15 +90,24 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid let totalRange (origId: Ident) (id: Ident) = withStartEnd origId.idRange.End id.idRange.Start origId.idRange + let rangeOfBlockSeparator (id: Ident) = + let idEnd = id.idRange.End + let blockSeparatorStartCol = idEnd.Column + let blockSeparatorEndCol = blockSeparatorStartCol + 4 + let blockSeparatorStartPos = mkPos idEnd.Line blockSeparatorStartCol + let blockSeparatorEndPos = mkPos idEnd.Line blockSeparatorEndCol + + withStartEnd blockSeparatorStartPos blockSeparatorEndPos id.idRange + match withExpr with - | SynExpr.Ident origId, Some(blockSep: BlockSeparator) -> - let lid, rng = upToId blockSep.Range id (origId :: ids) - Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), Some blockSep) - | SynExpr.Ident origId, None -> - // Synthesize a zero-width separator range at the end of the identifier when missing - let zero = origId.idRange.EndRange - let lid, rng = upToId zero id (origId :: ids) - Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), None) + | SynExpr.Ident origId, (blockSep: BlockSeparator option) -> + let mBlockSep = + match blockSep with + | Some sep -> sep.Range + | None -> rangeOfBlockSeparator origId + + let lid, rng = upToId mBlockSep id (origId :: ids) + Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), blockSep) | _ -> None let rec synExprRecd copyInfo (outerFieldId: Ident) innerFields exprBeingAssigned = @@ -161,10 +170,10 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid /// When the original expression in copy-and-update is more complex than `{ x with ... }`, like `{ f () with ... }`, /// we bind it first, so that it's not evaluated multiple times during a nested update let BindOriginalRecdExpr (withExpr: SynExpr * BlockSeparator option) mkRecdExpr = - let originalExpr, blockSepOpt = withExpr + let originalExpr, blockSep = withExpr let mOrigExprSynth = originalExpr.Range.MakeSynthetic() let id = mkSynId mOrigExprSynth "bind@" - let withExpr = SynExpr.Ident id, blockSepOpt + let withExpr = SynExpr.Ident id, blockSep let binding = mkSynBinding diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 74816cddd3c..9aaf8d472a8 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -5898,8 +5898,7 @@ and TcExprUndelayed (cenv: cenv) (overallTy: OverallTy) env tpenv (synExpr: SynE TcAnonRecdExpr cenv overallTy env tpenv (isStruct, withExprOpt, unsortedFieldExprs, mWholeExpr) ) | Some withExpr -> - BindOriginalRecdExpr withExpr (fun withExprOpt -> - SynExpr.AnonRecd (isStruct, withExprOpt, unsortedFieldExprs, mWholeExpr, trivia)) + BindOriginalRecdExpr withExpr (fun withExpr -> SynExpr.AnonRecd (isStruct, withExpr, unsortedFieldExprs, mWholeExpr, trivia)) |> TcExpr cenv overallTy env tpenv | SynExpr.ArrayOrList (isArray, args, m) -> @@ -7908,7 +7907,7 @@ and TcNewAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, unsortedField mkAnonRecd g mWholeExpr anonInfo unsortedFieldIds unsortedCheckedArgs unsortedFieldTys, tpenv -and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (origExpr, blockSeparatorOpt), unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = +and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (origExpr, blockSeparator), unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = // The fairly complex case '{| origExpr with X = 1; Y = 2 |}' // The origExpr may be either a record or anonymous record. // The origExpr may be either a struct or not. @@ -7934,7 +7933,7 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or match synLongIdent.LongIdent with | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), mWholeExpr)) | [ id ] -> ([], id), Some exprBeingAssigned - | lid -> TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparatorOpt)) + | lid -> TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparator)) |> GroupUpdatesToNestedFields let unsortedFieldSynExprsGiven = unsortedFieldIdsAndSynExprsGiven |> List.choose snd From 9139f3ee5aa2fbb461fd54d178aa2a537b0eaaf0 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 00:22:19 +0100 Subject: [PATCH 04/16] Reduce diff --- .../Checking/CheckRecordSyntaxHelpers.fs | 29 ++++++++++++------- .../Checking/Expressions/CheckExpressions.fs | 7 ++--- src/Compiler/pars.fsy | 5 ++++ .../SyntaxTree/Pattern/Named field 05.fs.bsl | 2 ++ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs index 0ea75863a42..19f1ccc11fb 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs @@ -90,15 +90,24 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid let totalRange (origId: Ident) (id: Ident) = withStartEnd origId.idRange.End id.idRange.Start origId.idRange + let rangeOfBlockSeparator (id: Ident) = + let idEnd = id.idRange.End + let blockSeparatorStartCol = idEnd.Column + let blockSeparatorEndCol = blockSeparatorStartCol + 4 + let blockSeparatorStartPos = mkPos idEnd.Line blockSeparatorStartCol + let blockSeparatorEndPos = mkPos idEnd.Line blockSeparatorEndCol + + withStartEnd blockSeparatorStartPos blockSeparatorEndPos id.idRange + match withExpr with - | SynExpr.Ident origId, Some(blockSep: BlockSeparator) -> - let lid, rng = upToId blockSep.Range id (origId :: ids) - Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), Some blockSep) - | SynExpr.Ident origId, None -> - // Synthesize a zero-width separator range at the end of the identifier when missing - let zero = origId.idRange.EndRange - let lid, rng = upToId zero id (origId :: ids) - Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), None) + | SynExpr.Ident origId, (blockSep: BlockSeparator option) -> + let mBlockSep = + match blockSep with + | Some sep -> sep.Range + | None -> rangeOfBlockSeparator origId + + let lid, rng = upToId mBlockSep id (origId :: ids) + Some(SynExpr.LongIdent(false, LongIdentWithDots(lid, rng), None, totalRange origId id), blockSep) | _ -> None let rec synExprRecd copyInfo (outerFieldId: Ident) innerFields exprBeingAssigned = @@ -161,10 +170,10 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid /// When the original expression in copy-and-update is more complex than `{ x with ... }`, like `{ f () with ... }`, /// we bind it first, so that it's not evaluated multiple times during a nested update let BindOriginalRecdExpr (withExpr: SynExpr * BlockSeparator option) mkRecdExpr = - let originalExpr, blockSepOpt = withExpr + let originalExpr, blockSep = withExpr let mOrigExprSynth = originalExpr.Range.MakeSynthetic() let id = mkSynId mOrigExprSynth "bind@" - let withExpr = SynExpr.Ident id, blockSepOpt + let withExpr = SynExpr.Ident id, blockSep let binding = mkSynBinding diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 74816cddd3c..9aaf8d472a8 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -5898,8 +5898,7 @@ and TcExprUndelayed (cenv: cenv) (overallTy: OverallTy) env tpenv (synExpr: SynE TcAnonRecdExpr cenv overallTy env tpenv (isStruct, withExprOpt, unsortedFieldExprs, mWholeExpr) ) | Some withExpr -> - BindOriginalRecdExpr withExpr (fun withExprOpt -> - SynExpr.AnonRecd (isStruct, withExprOpt, unsortedFieldExprs, mWholeExpr, trivia)) + BindOriginalRecdExpr withExpr (fun withExpr -> SynExpr.AnonRecd (isStruct, withExpr, unsortedFieldExprs, mWholeExpr, trivia)) |> TcExpr cenv overallTy env tpenv | SynExpr.ArrayOrList (isArray, args, m) -> @@ -7908,7 +7907,7 @@ and TcNewAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, unsortedField mkAnonRecd g mWholeExpr anonInfo unsortedFieldIds unsortedCheckedArgs unsortedFieldTys, tpenv -and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (origExpr, blockSeparatorOpt), unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = +and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (origExpr, blockSeparator), unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = // The fairly complex case '{| origExpr with X = 1; Y = 2 |}' // The origExpr may be either a record or anonymous record. // The origExpr may be either a struct or not. @@ -7934,7 +7933,7 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or match synLongIdent.LongIdent with | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), mWholeExpr)) | [ id ] -> ([], id), Some exprBeingAssigned - | lid -> TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparatorOpt)) + | lid -> TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparator)) |> GroupUpdatesToNestedFields let unsortedFieldSynExprsGiven = unsortedFieldIdsAndSynExprsGiven |> List.choose snd diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 00b09a32c4e..c84270f77da 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3674,6 +3674,11 @@ namePatPairs: { let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range let lid = SynLongIdent([id], [], [None]) + let mSep = + match $3 with + | Some sep -> sep.Range + | None -> rhs parseState 3 + reportParseErrorAt mSep (FSComp.SR.parsExpectingPattern ()) NamePatPairField(lid, mEq, m, pat, $2) :: $4 } namePatPair: diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index ce5277b0664..afe6caa03af 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -28,3 +28,5 @@ ImplFile { ConditionalDirectives = [] WarnDirectives = [] CodeComments = [] }, set [])) + +(4,11)-(4,12) parse error Expecting pattern From 74db5c8ee207611bd8d00e0a78159cd3489e0618 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 13:06:02 +0100 Subject: [PATCH 05/16] reduce diff --- src/Compiler/pars.fsy | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index c84270f77da..ee7065890f7 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -3671,14 +3671,11 @@ namePatPairs: NamePatPairField(lid, mEq, m, pat, $2) :: $3 } | namePatPair seps_block seps_block namePatPairs - { let (id: Ident), mEq, (pat: SynPat) = $1 + { let mSep = match $3 with | Some sep -> sep.Range | None -> rhs parseState 3 + reportParseErrorAt mSep (FSComp.SR.parsExpectingPattern ()) + let (id: Ident), mEq, (pat: SynPat) = $1 let m = unionRanges id.idRange pat.Range let lid = SynLongIdent([id], [], [None]) - let mSep = - match $3 with - | Some sep -> sep.Range - | None -> rhs parseState 3 - reportParseErrorAt mSep (FSComp.SR.parsExpectingPattern ()) NamePatPairField(lid, mEq, m, pat, $2) :: $4 } namePatPair: From fcc7b418b0255a85ed9a5799e4b90413ada567d5 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 15:08:57 +0100 Subject: [PATCH 06/16] Remove position from BlockSeparator --- src/Compiler/Service/ServiceParseTreeWalk.fs | 4 ++-- src/Compiler/SyntaxTree/SyntaxTree.fs | 9 ++------- src/Compiler/SyntaxTree/SyntaxTree.fsi | 8 ++------ src/Compiler/pars.fsy | 6 +++--- ...Compiler.Service.SurfaceArea.netstandard20.bsl | 10 ++-------- ...angeOfTheEqualsSignInSynExprRecordField.fs.bsl | 15 +++++++-------- .../data/SyntaxTree/Pattern/Named field 01.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Named field 02.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Named field 03.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Named field 04.fs.bsl | 14 +++++++------- .../data/SyntaxTree/Pattern/Named field 05.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Named field 06.fs.bsl | 4 ++-- .../data/SyntaxTree/Pattern/Named field 07.fs.bsl | 4 ++-- .../data/SyntaxTree/Pattern/Named field 08.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 02.fs.bsl | 2 +- .../data/SyntaxTree/Pattern/Record 07.fs.bsl | 4 ++-- .../SynType/Typed LetBang AndBang 03.fs.bsl | 2 +- .../SynType/Typed LetBang AndBang 04.fs.bsl | 2 +- .../SynType/Typed LetBang AndBang 05.fs.bsl | 2 +- 19 files changed, 40 insertions(+), 56 deletions(-) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index 7846593fab8..a36b53e7adf 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -500,7 +500,7 @@ module SyntaxTraversal = // inherit A() // $ // field1 = 5 - diveIntoSeparator blockSep.Position None) + diveIntoSeparator blockSep.Range.End None) | None -> () | _ -> () @@ -561,7 +561,7 @@ module SyntaxTraversal = // field1 = 5 // $ // field2 = 5 - diveIntoSeparator blockSep.Position copyOpt) + diveIntoSeparator blockSep.Range.End copyOpt) | _ -> () ] diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 115f0a61878..cf55c13688b 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -308,19 +308,14 @@ type SeqExprOnly = SeqExprOnly of bool [] type BlockSeparator = - | Semicolon of range: range * position: pos - | Comma of range: range * position: pos + | Semicolon of range: range + | Comma of range: range member this.Range = match this with | Semicolon(range = m) | Comma(range = m) -> m - member this.Position = - match this with - | Semicolon(position = p) -> p - | Comma(position = p) -> p - type RecordFieldName = SynLongIdent * bool type ExprAtomicFlag = diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index a60daaee481..fb3f93e4c33 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -359,17 +359,13 @@ type SeqExprOnly = type BlockSeparator = /// A separator consisting of a semicolon ';' /// range is the range of the semicolon - /// position is the position of the semicolon - | Semicolon of range: range * position: pos + | Semicolon of range: range /// A separator consisting of a comma ',' /// range is the range of the comma - /// position is the position of the comma - | Comma of range: range * position: pos + | Comma of range: range member Range: range - member Position: pos - /// Represents a record field name plus a flag indicating if given record field name is syntactically /// correct and can be used in name resolution. type RecordFieldName = SynLongIdent * bool diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index ee7065890f7..cc4d2a65d05 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -5771,13 +5771,13 @@ seps_block: | SEMICOLON { let m = (rhs parseState 1) - Some (BlockSeparator.Semicolon(m, m.End)) } + Some (BlockSeparator.Semicolon(m)) } | SEMICOLON OBLOCKSEP - { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2), (rhs parseState 1).End)) } + { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2))) } | OBLOCKSEP SEMICOLON - { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2), (rhs parseState 2).End)) } + { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2))) } /* identifier can start from the underscore */ diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl index f312e981ab7..4d32be86b59 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl @@ -5919,12 +5919,8 @@ FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 GetHashCode(System.Collections.IEqua FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 Tag FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 get_Tag() FSharp.Compiler.Symbols.FSharpXmlDoc: System.String ToString() -FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Position get_position() -FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Position position FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.BlockSeparator+Comma: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Position get_position() -FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Position position FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.BlockSeparator+Semicolon: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.BlockSeparator+Tags: Int32 Comma @@ -5933,13 +5929,11 @@ FSharp.Compiler.Syntax.BlockSeparator: Boolean IsComma FSharp.Compiler.Syntax.BlockSeparator: Boolean IsSemicolon FSharp.Compiler.Syntax.BlockSeparator: Boolean get_IsComma() FSharp.Compiler.Syntax.BlockSeparator: Boolean get_IsSemicolon() -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewComma(FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Position) -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewSemicolon(FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Position) +FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewComma(FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator NewSemicolon(FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator+Comma FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator+Semicolon FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Syntax.BlockSeparator+Tags -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Position Position -FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Position get_Position() FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Range Range FSharp.Compiler.Syntax.BlockSeparator: FSharp.Compiler.Text.Range get_Range() FSharp.Compiler.Syntax.BlockSeparator: Int32 Tag diff --git a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index 34e4bc06fff..7056c6b65a7 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -14,14 +14,13 @@ ImplFile (LongIdent (SynLongIdent ([Exception], [], [None])), Paren (Ident msg, (2,19--2,20), Some (2,23--2,24), (2,19--2,24)), - (2,10--2,24), Some (Semicolon ((2,24--2,25), (2,25))), - (2,2--2,9)), None, + (2,10--2,24), Some (Semicolon (2,24--2,25)), (2,2--2,9)), + None, [SynExprRecordField ((SynLongIdent ([X], [], [None]), true), Some (2,28--2,29), Some (Const (Int32 1, (2,30--2,31))), (2,26--2,31), - Some (Semicolon ((2,31--2,32), (2,32))))], (2,0--2,34)), - (2,0--2,34))], PreXmlDocEmpty, [], None, (2,0--2,34), - { LeadingKeyword = None })], (true, true), - { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + Some (Semicolon (2,31--2,32)))], (2,0--2,34)), (2,0--2,34))], + PreXmlDocEmpty, [], None, (2,0--2,34), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl index 88e955dc24f..982233c7570 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 01.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), (4,10)))); + Some (Semicolon (4,9--4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), (4,11--4,16), Wild (4,15--4,16), None)], diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl index 2c4fc58c8c7..1b58efecce1 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 02.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), (4,10)))); + Some (Semicolon (4,9--4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), (4,11--4,14), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl index 22f21885960..27b042a0960 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 03.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), (4,10)))); + Some (Semicolon (4,9--4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), None, (4,11--4,12), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl index 846ad8f2ef7..f5c8eaf68ff 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 04.fs.bsl @@ -13,13 +13,13 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), (4,10))))], - (4,4--4,10), { ParenRange = (4,3--4,11) }), None, - (4,2--4,11)), None, Const (Int32 2, (4,15--4,16)), - (4,2--4,16), Yes, { ArrowRange = Some (4,12--4,14) - BarRange = Some (4,0--4,1) })], - (3,0--4,16), { MatchKeyword = (3,0--3,5) - WithKeyword = (3,8--3,12) }), (3,0--4,16))], + Some (Semicolon (4,9--4,10)))], (4,4--4,10), + { ParenRange = (4,3--4,11) }), None, (4,2--4,11)), + None, Const (Int32 2, (4,15--4,16)), (4,2--4,16), Yes, + { ArrowRange = Some (4,12--4,14) + BarRange = Some (4,0--4,1) })], (3,0--4,16), + { MatchKeyword = (3,0--3,5) + WithKeyword = (3,8--3,12) }), (3,0--4,16))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,16), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl index afe6caa03af..d678719ceeb 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 05.fs.bsl @@ -13,7 +13,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([a], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), (4,10)))); + Some (Semicolon (4,9--4,10))); NamePatPairField (SynLongIdent ([c], [], [None]), Some (4,15--4,16), (4,13--4,18), Wild (4,17--4,18), None)], diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl index 8faaa9d384f..48be7064a13 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 06.fs.bsl @@ -15,13 +15,13 @@ ImplFile (4,4--4,9), Named (SynIdent (a, None), false, None, (4,8--4,9)), - Some (Semicolon ((4,9--4,10), (4,10)))); + Some (Semicolon (4,9--4,10))); NamePatPairField (SynLongIdent ([b], [], [None]), Some (4,13--4,14), (4,11--4,16), Named (SynIdent (b, None), false, None, (4,15--4,16)), - Some (Semicolon ((4,16--4,17), (4,17)))); + Some (Semicolon (4,16--4,17))); NamePatPairField (SynLongIdent ([c], [], [None]), Some (4,20--4,21), (4,18--4,23), diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl index d85a49dbb6c..fb6de8acc3b 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl @@ -19,11 +19,11 @@ ImplFile ([Foo; Bar; A], [(4,7--4,8); (4,11--4,12)], [None; None; None]), Some (4,14--4,15), (4,4--4,17), Const (Int32 1, (4,16--4,17)), - Some (Semicolon ((4,17--4,18), (4,18)))); + Some (Semicolon (4,17--4,18))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,21--4,22), (4,19--4,24), Const (Int32 2, (4,23--4,24)), - Some (Semicolon ((4,24--4,25), (4,25)))); + Some (Semicolon (4,24--4,25))); NamePatPairField (SynLongIdent ([C], [], [None]), Some (4,28--4,29), (4,26--4,31), Const (Int32 3, (4,30--4,31)), None)], diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl index 0f2a667f2ee..eeca2004b89 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl @@ -17,7 +17,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([A], [], [None]), None, (4,4--4,5), FromParseError (Wild (4,5--4,5), (4,5--4,5)), - Some (Semicolon ((4,6--4,7), (4,7)))); + Some (Semicolon (4,6--4,7))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,10--4,11), (4,8--4,13), Const (Int32 3, (4,12--4,13)), None)], diff --git a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl index 5064b4b9d5e..c588d1d6e86 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 02.fs.bsl @@ -11,7 +11,7 @@ ImplFile ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), (4,4--4,9), Wild (4,8--4,9), - Some (Semicolon ((4,9--4,10), (4,10)))); + Some (Semicolon (4,9--4,10))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,13--4,14), (4,11--4,16), Wild (4,15--4,16), None)], (4,2--4,18)), diff --git a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl index 21347bba449..ce3e7f90c4e 100644 --- a/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Record 07.fs.bsl @@ -11,11 +11,11 @@ ImplFile ([NamePatPairField (SynLongIdent ([A], [], [None]), Some (4,6--4,7), (4,4--4,9), Const (Int32 1, (4,8--4,9)), - Some (Semicolon ((4,9--4,10), (4,10)))); + Some (Semicolon (4,9--4,10))); NamePatPairField (SynLongIdent ([B], [], [None]), Some (4,13--4,14), (4,11--4,16), Const (Int32 2, (4,15--4,16)), - Some (Semicolon ((4,16--4,17), (4,17)))); + Some (Semicolon (4,16--4,17))); NamePatPairField (SynLongIdent ([C], [], [None]), Some (4,20--4,21), (4,18--4,23), Const (Int32 3, (4,22--4,23)), None)], diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl index 69c6077510e..6e5b86077fb 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl @@ -26,7 +26,7 @@ ImplFile Named (SynIdent (name, None), false, None, (4,19--4,23)), - Some (Semicolon ((4,23--4,24), (4,24)))); + Some (Semicolon (4,23--4,24))); NamePatPairField (SynLongIdent ([Age], [], [None]), Some (4,29--4,30), (4,25--4,34), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl index e1de7829929..aa77bcfe4fe 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl @@ -25,7 +25,7 @@ ImplFile Named (SynIdent (name, None), false, None, (4,18--4,22)), - Some (Semicolon ((4,22--4,23), (4,23)))); + Some (Semicolon (4,22--4,23))); NamePatPairField (SynLongIdent ([Age], [], [None]), Some (4,28--4,29), (4,24--4,33), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl index 4f2aa606d54..d9c296046a7 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl @@ -26,7 +26,7 @@ ImplFile Named (SynIdent (name, None), false, None, (4,19--4,23)), - Some (Semicolon ((4,23--4,24), (4,24)))); + Some (Semicolon (4,23--4,24))); NamePatPairField (SynLongIdent ([Age], [], [None]), Some (4,29--4,30), (4,25--4,34), From ae13b594ce939fd5103ecf742302d69f9ff4afff Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 20:10:57 +0100 Subject: [PATCH 07/16] Use a more accurate separator range --- src/Compiler/pars.fsy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index cc4d2a65d05..9f41a6de6c1 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -5774,10 +5774,12 @@ seps_block: Some (BlockSeparator.Semicolon(m)) } | SEMICOLON OBLOCKSEP - { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2))) } + { let mSemi = (rhs parseState 1) + Some (BlockSeparator.Semicolon(mSemi)) } | OBLOCKSEP SEMICOLON - { Some (BlockSeparator.Semicolon((rhs2 parseState 1 2))) } + { let mSemi = (rhs parseState 2) + Some (BlockSeparator.Semicolon(mSemi)) } /* identifier can start from the underscore */ From c9be8b78b4e4ce570bcdaa2eaaac789f1488b4ec Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 20:11:07 +0100 Subject: [PATCH 08/16] Use nested match --- src/Compiler/Service/ServiceParseTreeWalk.fs | 48 ++++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index a36b53e7adf..142b9471112 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -445,20 +445,20 @@ module SyntaxTraversal = | SynExpr.AnonRecd(copyInfo = copyOpt; recordFields = fields) -> [ match copyOpt with - | Some(expr, Some blockSep) -> + | Some(expr, blockSep) -> yield dive expr expr.Range traverseSynExpr - yield - dive () blockSep.Range (fun () -> - if posGeq pos blockSep.Range.End then - // special case: caret is after WITH - // { x with $ } - visitor.VisitRecordField(path, Some expr, None) - else - None) - | Some(expr, None) -> - // No explicit separator (implicit OBLOCKSEP). Still dive into expr. - yield dive expr expr.Range traverseSynExpr + match blockSep with + | Some blockSep -> + yield + dive () blockSep.Range (fun () -> + if posGeq pos blockSep.Range.End then + // special case: caret is after WITH + // { x with $ } + visitor.VisitRecordField(path, Some expr, None) + else + None) + | None -> () | _ -> () for field, _, x in fields do @@ -505,20 +505,20 @@ module SyntaxTraversal = | _ -> () match copyOpt with - | Some(expr, Some blockSep) -> + | Some(expr, blockSep) -> yield dive expr expr.Range traverseSynExpr - yield - dive () blockSep.Range (fun () -> - if posGeq pos blockSep.Range.End then - // special case: caret is after WITH - // { x with $ } - visitor.VisitRecordField(path, Some expr, None) - else - None) - | Some(expr, None) -> - // No explicit separator (implicit OBLOCKSEP). Still dive into expr. - yield dive expr expr.Range traverseSynExpr + match blockSep with + | Some blockSep -> + yield + dive () blockSep.Range (fun () -> + if posGeq pos blockSep.Range.End then + // special case: caret is after WITH + // { x with $ } + visitor.VisitRecordField(path, Some expr, None) + else + None) + | None -> () | _ -> () let copyOpt = Option.map fst copyOpt From fb776abedbdb49294273d29ffc3f00a35957626b Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 20:34:15 +0100 Subject: [PATCH 09/16] extracting common logic in diveIntoRecordLikeExpr --- src/Compiler/Service/ServiceParseTreeWalk.fs | 53 ++++++++------------ 1 file changed, 21 insertions(+), 32 deletions(-) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index 142b9471112..46f553d40dd 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -400,6 +400,25 @@ module SyntaxTraversal = let traverseSynType = traverseSynType path let traversePat = traversePat path + let diveIntoRecordLikeExpr path (copyOpt: (SynExpr * BlockSeparator option) option) = + [ + match copyOpt with + | Some(expr, blockSep) -> + yield dive expr expr.Range traverseSynExpr + + match blockSep with + | Some blockSep -> + yield + dive () blockSep.Range (fun () -> + if posGeq pos blockSep.Range.End then + // { x with $ } + visitor.VisitRecordField(path, Some expr, None) + else + None) + | None -> () + | None -> () + ] + match e with | SynExpr.LongIdentSet(expr = synExpr) | SynExpr.DotGet(expr = synExpr) @@ -444,22 +463,7 @@ module SyntaxTraversal = | SynExpr.AnonRecd(copyInfo = copyOpt; recordFields = fields) -> [ - match copyOpt with - | Some(expr, blockSep) -> - yield dive expr expr.Range traverseSynExpr - - match blockSep with - | Some blockSep -> - yield - dive () blockSep.Range (fun () -> - if posGeq pos blockSep.Range.End then - // special case: caret is after WITH - // { x with $ } - visitor.VisitRecordField(path, Some expr, None) - else - None) - | None -> () - | _ -> () + yield! diveIntoRecordLikeExpr path copyOpt for field, _, x in fields do yield dive () field.Range (fun () -> visitor.VisitRecordField(path, copyOpt |> Option.map fst, Some field)) @@ -504,22 +508,7 @@ module SyntaxTraversal = | None -> () | _ -> () - match copyOpt with - | Some(expr, blockSep) -> - yield dive expr expr.Range traverseSynExpr - - match blockSep with - | Some blockSep -> - yield - dive () blockSep.Range (fun () -> - if posGeq pos blockSep.Range.End then - // special case: caret is after WITH - // { x with $ } - visitor.VisitRecordField(path, Some expr, None) - else - None) - | None -> () - | _ -> () + yield! diveIntoRecordLikeExpr path copyOpt let copyOpt = Option.map fst copyOpt From 8828dad125565d72847aa0e810da2d31df3635f4 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sat, 20 Sep 2025 21:35:19 +0100 Subject: [PATCH 10/16] Fix editor test --- src/Compiler/Service/ServiceParseTreeWalk.fs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index 46f553d40dd..0ff3b222d9f 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -400,12 +400,14 @@ module SyntaxTraversal = let traverseSynType = traverseSynType path let traversePat = traversePat path - let diveIntoRecordLikeExpr path (copyOpt: (SynExpr * BlockSeparator option) option) = + let diveIntoRecordLikeExpr path (exprRange: range) (hasFields: bool) (copyOpt: (SynExpr * BlockSeparator option) option) = [ match copyOpt with | Some(expr, blockSep) -> + // Dive into the copy expression yield dive expr expr.Range traverseSynExpr + // Dive into the WITH separator (if present) and handle caret-after-WITH match blockSep with | Some blockSep -> yield @@ -415,7 +417,16 @@ module SyntaxTraversal = visitor.VisitRecordField(path, Some expr, None) else None) - | None -> () + | None -> + // If there is a copy-with but no explicit separator and no fields yet, + // still offer field completions once the caret is after the copy expr. + if not hasFields then + yield + dive () exprRange (fun () -> + if posGeq pos expr.Range.End then + visitor.VisitRecordField(path, Some expr, None) + else + None) | None -> () ] @@ -463,7 +474,7 @@ module SyntaxTraversal = | SynExpr.AnonRecd(copyInfo = copyOpt; recordFields = fields) -> [ - yield! diveIntoRecordLikeExpr path copyOpt + yield! diveIntoRecordLikeExpr path expr.Range (not (List.isEmpty fields)) copyOpt for field, _, x in fields do yield dive () field.Range (fun () -> visitor.VisitRecordField(path, copyOpt |> Option.map fst, Some field)) @@ -508,7 +519,7 @@ module SyntaxTraversal = | None -> () | _ -> () - yield! diveIntoRecordLikeExpr path copyOpt + yield! diveIntoRecordLikeExpr path expr.Range (not (List.isEmpty fields)) copyOpt let copyOpt = Option.map fst copyOpt From aa7bd574b9b66f8f879f1f4b8adaec61364e7caa Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Sun, 21 Sep 2025 16:50:02 +0100 Subject: [PATCH 11/16] fix test: Disallow completion before with keyword --- .../EditorTests.fs | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tests/FSharp.Compiler.Service.Tests/EditorTests.fs b/tests/FSharp.Compiler.Service.Tests/EditorTests.fs index 6df9a1dc4a9..0f242171d27 100644 --- a/tests/FSharp.Compiler.Service.Tests/EditorTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/EditorTests.fs @@ -1929,6 +1929,15 @@ let hasRecordField (fieldName:string) (symbolUses: FSharpSymbolUse list) = ) |> fun exists -> Assert.True(exists, $"Field {fieldName} not found.") +let notHasRecordField (fieldName:string) (symbolUses: FSharpSymbolUse list) = + symbolUses + |> List.exists (fun symbolUse -> + match symbolUse.Symbol with + | :? FSharpField as field -> field.DisplayName = fieldName + | _ -> false + ) + |> fun exists -> Assert.False(exists, $"Field {fieldName} should not be found.") + let hasRecordType (recordTypeName: string) (symbolUses: FSharpSymbolUse list) = symbolUses |> List.exists (fun symbolUse -> @@ -2144,3 +2153,34 @@ let rUpdate = { r1 with Fi } hasRecordField "Field1" declarations hasRecordField "Field2" declarations + +[] +let ``No record fields are completed before 'with' in update record`` () = + let parseResults, checkResults = + getParseAndCheckResults """ +module Module + +type T = + { AAA: int } + +let r = { AAA = 5 } + +let b = { r with } +""" + + let declarations = + checkResults.GetDeclarationListSymbols( + Some parseResults, + 9, + "let b = { r with }", + { + EndColumn = 12 + LastDotPos = None + PartialIdent = "" + QualifyingIdents = [] + }, + fun _ -> List.empty + ) + |> List.concat + + notHasRecordField "AAA" declarations From 04d0c5bb7d5fbd3e24d9d38aa06d267ae218383f Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 23 Sep 2025 16:51:00 +0300 Subject: [PATCH 12/16] Update pars.fsy --- src/Compiler/pars.fsy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 9f41a6de6c1..613cf033211 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -5744,15 +5744,15 @@ recdExprCore: | appExpr WITH recdBinding recdExprBindings opt_seps_block { let l = List.rev $4 let l = rebindRanges $3 l $5 - (Some($1, $5), l) } + (Some($1, None), l) } | appExpr OWITH opt_seps_block OEND - { (Some($1, $3), []) } + { (Some($1, None), []) } | appExpr OWITH recdBinding recdExprBindings opt_seps_block OEND { let l = List.rev $4 let l = rebindRanges $3 l $5 - (Some($1, $5), l) } + (Some($1, None), l) } opt_seps_block: | seps_block From ffdaa6e65e8724bcdca5c482e1e79d1c0fb890d2 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 24 Sep 2025 00:10:36 +0300 Subject: [PATCH 13/16] rollback the behavior to pre-#18899 --- src/Compiler/Service/ServiceParseTreeWalk.fs | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index 0ff3b222d9f..38504a36c41 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -400,7 +400,7 @@ module SyntaxTraversal = let traverseSynType = traverseSynType path let traversePat = traversePat path - let diveIntoRecordLikeExpr path (exprRange: range) (hasFields: bool) (copyOpt: (SynExpr * BlockSeparator option) option) = + let diveIntoRecordLikeExpr path (copyOpt: (SynExpr * BlockSeparator option) option) = [ match copyOpt with | Some(expr, blockSep) -> @@ -418,15 +418,21 @@ module SyntaxTraversal = else None) | None -> - // If there is a copy-with but no explicit separator and no fields yet, - // still offer field completions once the caret is after the copy expr. - if not hasFields then + // FIXME: handle caret-after-WITH when no separator token + match expr with + | SynExpr.Ident id -> + let idEnd = id.idRange.End + let withStartPos = mkPos idEnd.Line idEnd.Column + let withEndPos = mkPos idEnd.Line (idEnd.Column + 4) + let withRange = withStartEnd withStartPos withEndPos id.idRange + yield - dive () exprRange (fun () -> - if posGeq pos expr.Range.End then + dive () withRange (fun () -> + if posGeq pos withEndPos then visitor.VisitRecordField(path, Some expr, None) else None) + | _ -> () | None -> () ] @@ -474,7 +480,7 @@ module SyntaxTraversal = | SynExpr.AnonRecd(copyInfo = copyOpt; recordFields = fields) -> [ - yield! diveIntoRecordLikeExpr path expr.Range (not (List.isEmpty fields)) copyOpt + yield! diveIntoRecordLikeExpr path copyOpt for field, _, x in fields do yield dive () field.Range (fun () -> visitor.VisitRecordField(path, copyOpt |> Option.map fst, Some field)) @@ -519,7 +525,7 @@ module SyntaxTraversal = | None -> () | _ -> () - yield! diveIntoRecordLikeExpr path expr.Range (not (List.isEmpty fields)) copyOpt + yield! diveIntoRecordLikeExpr path copyOpt let copyOpt = Option.map fst copyOpt From 37b3cf103164300a0c9a8b4dc7617037878ac54c Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Wed, 24 Sep 2025 23:23:11 +0300 Subject: [PATCH 14/16] Avoid capturing {x with} as separator --- src/Compiler/pars.fsy | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 613cf033211..54d3f0c190d 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -5740,20 +5740,6 @@ recdExprCore: let l = rebindRanges (f, Some mEquals, Some $3) l $5 (None, l) } -/* handles case like {x with} */ - | appExpr WITH recdBinding recdExprBindings opt_seps_block - { let l = List.rev $4 - let l = rebindRanges $3 l $5 - (Some($1, None), l) } - - | appExpr OWITH opt_seps_block OEND - { (Some($1, None), []) } - - | appExpr OWITH recdBinding recdExprBindings opt_seps_block OEND - { let l = List.rev $4 - let l = rebindRanges $3 l $5 - (Some($1, None), l) } - opt_seps_block: | seps_block { $1 } From 1ff5bed81949dbe6b4471cc115825ff03b7241a4 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Thu, 25 Sep 2025 11:09:19 +0300 Subject: [PATCH 15/16] capture with keyword using trivia --- .../Checking/CheckRecordSyntaxHelpers.fs | 8 +- .../Checking/Expressions/CheckExpressions.fs | 10 +-- .../Service/FSharpParseFileResults.fs | 2 +- .../Service/ServiceInterfaceStubGenerator.fs | 2 +- src/Compiler/Service/ServiceParsedInputOps.fs | 6 +- src/Compiler/Service/ServiceStructure.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTree.fs | 5 +- src/Compiler/SyntaxTree/SyntaxTree.fsi | 5 +- src/Compiler/SyntaxTree/SyntaxTreeOps.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTrivia.fs | 2 +- src/Compiler/SyntaxTree/SyntaxTrivia.fsi | 4 +- src/Compiler/pars.fsy | 72 +++++++++++------- ...iler.Service.SurfaceArea.netstandard20.bsl | 20 +++-- ..._FSharp.Compiler.Service_Debug_net10.0.bsl | 32 ++++---- ....Compiler.Service_Debug_netstandard2.0.bsl | 34 ++++----- ...Sharp.Compiler.Service_Release_net10.0.bsl | 56 +++++++------- ...ompiler.Service_Release_netstandard2.0.bsl | 76 +++++++++---------- .../Expression/AnonRecd - Quotation 01.fs.bsl | 9 ++- .../Expression/AnonRecd - Quotation 02.fs.bsl | 9 ++- .../Expression/AnonRecd - Quotation 03.fs.bsl | 9 ++- .../Expression/AnonRecd - Quotation 04.fs.bsl | 18 +++-- .../Expression/AnonymousRecords-01.fs.bsl | 26 ++++--- .../Expression/AnonymousRecords-02.fs.bsl | 11 +-- .../Expression/AnonymousRecords-03.fs.bsl | 11 +-- .../Expression/AnonymousRecords-04.fs.bsl | 3 +- .../Expression/AnonymousRecords-05.fs.bsl | 12 +-- .../Expression/AnonymousRecords-06.fs.bsl | 9 ++- .../Expression/AnonymousRecords-07.fs.bsl | 12 ++- .../Expression/AnonymousRecords-08.fs.bsl | 12 ++- .../Expression/AnonymousRecords-09.fs.bsl | 12 ++- .../Expression/AnonymousRecords-10.fs.bsl | 12 ++- .../Expression/AnonymousRecords-11.fs.bsl | 40 +++++----- .../Expression/AnonymousRecords-12.fs.bsl | 12 ++- .../Expression/AnonymousRecords-13.fs.bsl | 6 +- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 11 +-- .../Expression/InheritRecord - Field 1.fs.bsl | 4 +- .../Expression/InheritRecord - Field 2.fs.bsl | 4 +- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 12 +-- .../Expression/Record - Anon 01.fs.bsl | 3 +- .../Expression/Record - Anon 02.fs.bsl | 3 +- .../Expression/Record - Anon 03.fs.bsl | 3 +- .../Expression/Record - Anon 04.fs.bsl | 3 +- .../Expression/Record - Anon 05.fs.bsl | 3 +- .../Expression/Record - Anon 06.fs.bsl | 3 +- .../Expression/Record - Anon 07.fs.bsl | 3 +- .../Expression/Record - Anon 08.fs.bsl | 3 +- .../Expression/Record - Anon 09.fs.bsl | 3 +- .../Expression/Record - Anon 10.fs.bsl | 3 +- .../Expression/Record - Anon 11.fs.bsl | 3 +- .../Expression/Record - Anon 12.fs.bsl | 3 +- .../Expression/Record - Field 03.fs.bsl | 4 +- .../Expression/Record - Field 04.fs.bsl | 4 +- .../Expression/Record - Field 05.fs.bsl | 3 +- .../Expression/Record - Field 06.fs.bsl | 4 +- .../Expression/Record - Field 08.fs.bsl | 4 +- .../Expression/Record - Field 09.fs.bsl | 4 +- .../Expression/Record - Field 11.fs.bsl | 4 +- .../Expression/Record - Field 12.fs.bsl | 3 +- .../Expression/Record - Field 13.fs.bsl | 4 +- .../Expression/Record - Field 14.fs.bsl | 3 +- .../SynExprAnonRecdWithStructKeyword.fs.bsl | 6 +- ...sTheRangeOfTheEqualsSignInTheFields.fs.bsl | 11 +-- ...OfTheEqualsSignInSynExprRecordField.fs.bsl | 11 +-- ...dFieldsContainCorrectAmountOfTrivia.fs.bsl | 11 +-- .../SyntaxTree/Pattern/Named field 07.fs.bsl | 4 +- .../SyntaxTree/Pattern/Named field 08.fs.bsl | 4 +- .../SynType/Typed LetBang 13.fs.bsl | 5 +- 67 files changed, 420 insertions(+), 297 deletions(-) diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs index 19f1ccc11fb..46e7f6c31a7 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs @@ -36,9 +36,9 @@ let GroupUpdatesToNestedFields (fields: ((Ident list * Ident) * SynExpr option) | [ x ] -> x :: res | x :: y :: ys -> match x, y with - | (lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1, m))), (_, Some(SynExpr.Record(recordFields = fields2))) -> + | (lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1, m, trivia))), (_, Some(SynExpr.Record(recordFields = fields2))) -> let reducedRecd = - (lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1 @ fields2, m))) + (lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1 @ fields2, m, trivia))) groupIfNested res (reducedRecd :: ys) | (lidwid, Some(SynExpr.AnonRecd(isStruct, copyInfo, fields1, m, trivia))), (_, Some(SynExpr.AnonRecd(recordFields = fields2))) -> @@ -136,7 +136,7 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid | Some(exprWhenWith, sepOpt) -> Some(exprWhenWith, sepOpt) | None -> None - SynExpr.AnonRecd(isStruct, copyInfoAnon, fields, outerFieldId.idRange, { OpeningBraceRange = range0 }) + SynExpr.AnonRecd(isStruct, copyInfoAnon, fields, outerFieldId.idRange, { OpeningBraceRange = range0; WithKeyword = None }) | _ -> let fields = [ @@ -149,7 +149,7 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid ) ] - SynExpr.Record(None, copyInfo outerFieldId, fields, outerFieldId.idRange) + SynExpr.Record(None, copyInfo outerFieldId, fields, outerFieldId.idRange, { OpeningBraceRange = outerFieldId.idRange; WithKeyword = None }) let access, fields = ResolveNestedField cenv.tcSink cenv.nameResolver env.eNameResEnv env.eAccessRights overallTy lid diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index ef5eae5c996..ee911417434 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -5929,14 +5929,14 @@ and TcExprUndelayed (cenv: cenv) (overallTy: OverallTy) env tpenv (synExpr: SynE let binds = unionBindingAndMembers binds members TcExprObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, mNewExpr, m) - | SynExpr.Record (inherits, withExprOpt, synRecdFields, mWholeExpr) -> + | SynExpr.Record (inherits, withExprOpt, synRecdFields, mWholeExpr, _trivia) -> match withExprOpt with | None | Some(SynExpr.Ident _, _) -> TcNonControlFlowExpr env <| fun env -> TcExprRecord cenv overallTy env tpenv (inherits, withExprOpt, synRecdFields, mWholeExpr) | Some withExpr -> - BindOriginalRecdExpr withExpr (fun withExpr -> SynExpr.Record (inherits, withExpr, synRecdFields, mWholeExpr)) + BindOriginalRecdExpr withExpr (fun withExpr -> SynExpr.Record (inherits, withExpr, synRecdFields, mWholeExpr, { OpeningBraceRange = mWholeExpr; WithKeyword = None })) |> TcExpr cenv overallTy env tpenv | SynExpr.While (spWhile, synGuardExpr, synBodyExpr, m) -> @@ -8288,7 +8288,7 @@ and Propagate (cenv: cenv) (overallTy: OverallTy) (env: TcEnv) tpenv (expr: Appl // async { } // seq { } - | SynExpr.Record (None, None, [], _) when g.langVersion.SupportsFeature LanguageFeature.EmptyBodiedComputationExpressions -> () + | SynExpr.Record (None, None, [], _, _) when g.langVersion.SupportsFeature LanguageFeature.EmptyBodiedComputationExpressions -> () // expr[idx] // expr[idx1, idx2] @@ -8588,7 +8588,7 @@ and TcApplicationThen (cenv: cenv) (overallTy: OverallTy) env tpenv mExprAndArg // seq { comp } // seq { } | SynExpr.ComputationExpr (false, comp, m) - | SynExpr.Record (None, None, EmptyFieldListAsUnit comp, m) when + | SynExpr.Record (None, None, EmptyFieldListAsUnit comp, m, _) when (match leftExpr with | ApplicableExpr(expr=Expr.Op(TOp.Coerce, _, [SeqExpr g], _)) -> true | _ -> false) -> @@ -8637,7 +8637,7 @@ and TcApplicationThen (cenv: cenv) (overallTy: OverallTy) env tpenv mExprAndArg // leftExpr { comp } // leftExpr { } | SynExpr.ComputationExpr (false, comp, _m) - | SynExpr.Record (None, None, EmptyFieldListAsUnit comp, _m) -> + | SynExpr.Record (None, None, EmptyFieldListAsUnit comp, _m, _) -> let bodyOfCompExpr, tpenv = cenv.TcComputationExpression cenv env overallTy tpenv (mLeftExpr, leftExpr.Expr, exprTy, comp) TcDelayed cenv overallTy env tpenv mExprAndArg (MakeApplicableExprNoFlex cenv bodyOfCompExpr) (tyOfExpr g bodyOfCompExpr) ExprAtomicFlag.NonAtomic delayed diff --git a/src/Compiler/Service/FSharpParseFileResults.fs b/src/Compiler/Service/FSharpParseFileResults.fs index f5c1d978447..a248dc7b9b5 100644 --- a/src/Compiler/Service/FSharpParseFileResults.fs +++ b/src/Compiler/Service/FSharpParseFileResults.fs @@ -629,7 +629,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | SynExpr.ArrayOrList(_, exprs, _) | SynExpr.Tuple(_, exprs, _, _) -> yield! walkExprs exprs - | SynExpr.Record(_, copyExprOpt, fs, _) -> + | SynExpr.Record(_, copyExprOpt, fs, _, _) -> match copyExprOpt with | Some(e, _) -> yield! walkExpr true e | None -> () diff --git a/src/Compiler/Service/ServiceInterfaceStubGenerator.fs b/src/Compiler/Service/ServiceInterfaceStubGenerator.fs index c53ab5d7583..735d2f6c975 100644 --- a/src/Compiler/Service/ServiceInterfaceStubGenerator.fs +++ b/src/Compiler/Service/ServiceInterfaceStubGenerator.fs @@ -849,7 +849,7 @@ module InterfaceStubGenerator = | SynExpr.Tuple(_, synExprList, _, _range) | SynExpr.ArrayOrList(_, synExprList, _range) -> List.tryPick walkExpr synExprList - | SynExpr.Record(_inheritOpt, _copyOpt, fields, _range) -> + | SynExpr.Record(_inheritOpt, _copyOpt, fields, _range, _) -> List.tryPick (fun (SynExprRecordField(expr = e)) -> Option.bind walkExpr e) fields | SynExpr.New(_, _synType, synExpr, _range) -> walkExpr synExpr diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 583c7c0f992..e8cc4cf44ca 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -818,7 +818,7 @@ module ParsedInput = | SynExpr.MatchLambda(matchClauses = clauses) -> List.tryPick walkClause clauses - | SynExpr.Record(_, _, fields, r) -> + | SynExpr.Record(_, _, fields, r, _) -> ifPosInRange r (fun _ -> fields |> List.tryPick (fun (SynExprRecordField(expr = e)) -> e |> Option.bind (walkExprWithKind parentKind))) @@ -1475,7 +1475,7 @@ module ParsedInput = | PartOfParameterList pos precedingArgument args -> Some(CompletionContext.ParameterList args) | _ -> defaultTraverse expr - | SynExpr.Record(None, None, [], _) -> Some(CompletionContext.RecordField RecordContext.Empty) + | SynExpr.Record(None, None, [], _, _) -> Some(CompletionContext.RecordField RecordContext.Empty) // Unchecked.defaultof | SynExpr.TypeApp(typeArgsRange = range) when rangeContainsPos range pos -> Some CompletionContext.Type @@ -1501,7 +1501,7 @@ module ParsedInput = | SyntaxNode.SynExpr _ :: SyntaxNode.SynBinding _ :: SyntaxNode.SynMemberDefn _ :: SyntaxNode.SynTypeDefn(SynTypeDefn( typeInfo = SynComponentInfo(longId = [ id ]))) :: _ -> RecordContext.Constructor(id.idText) - | SyntaxNode.SynExpr(SynExpr.Record(None, _, fields, _)) :: _ -> + | SyntaxNode.SynExpr(SynExpr.Record(None, _, fields, _, _)) :: _ -> let isFirstField = match field, fields with | Some contextLid, SynExprRecordField(fieldName = lid, _) :: _ -> contextLid.Range = lid.Range diff --git a/src/Compiler/Service/ServiceStructure.fs b/src/Compiler/Service/ServiceStructure.fs index bcf0d8d2bc8..942624b86ed 100644 --- a/src/Compiler/Service/ServiceStructure.fs +++ b/src/Compiler/Service/ServiceStructure.fs @@ -430,7 +430,7 @@ module Structure = | SynExpr.Paren(e, _, _, _) -> parseExpr e - | SynExpr.Record(recCtor, recCopy, recordFields, r) -> + | SynExpr.Record(recCtor, recCopy, recordFields, r, _) -> match recCtor with | Some(_, ctorArgs, _, _, _) -> parseExpr ctorArgs | _ -> () diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index cf55c13688b..efe6870cc75 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -544,7 +544,7 @@ type SynExpr = copyInfo: (SynExpr * BlockSeparator option) option * recordFields: (SynLongIdent * range option * SynExpr) list * range: range * - trivia: SynExprAnonRecdTrivia + trivia: SynExprRecdTrivia | ArrayOrList of isArray: bool * exprs: SynExpr list * range: range @@ -552,7 +552,8 @@ type SynExpr = baseInfo: (SynType * SynExpr * range * BlockSeparator option * range) option * copyInfo: (SynExpr * BlockSeparator option) option * recordFields: SynExprRecordField list * - range: range + range: range * + trivia: SynExprRecdTrivia | New of isProtected: bool * targetType: SynType * expr: SynExpr * range: range diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index fb3f93e4c33..44dc08ad932 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -601,7 +601,7 @@ type SynExpr = copyInfo: (SynExpr * BlockSeparator option) option * recordFields: (SynLongIdent * range option * SynExpr) list * range: range * - trivia: SynExprAnonRecdTrivia + trivia: SynExprRecdTrivia /// F# syntax: [ e1; ...; en ], [| e1; ...; en |] | ArrayOrList of isArray: bool * exprs: SynExpr list * range: range @@ -614,7 +614,8 @@ type SynExpr = baseInfo: (SynType * SynExpr * range * BlockSeparator option * range) option * copyInfo: (SynExpr * BlockSeparator option) option * recordFields: SynExprRecordField list * - range: range + range: range * + trivia: SynExprRecdTrivia /// F# syntax: new C(...) /// The flag is true if known to be 'family' ('protected') scope diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index 5669b0cd087..0c14e57504e 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -924,7 +924,7 @@ let rec synExprContainsError inpExpr = | None -> false) || walkExprs (List.map (fun (_, _, e) -> e) flds) - | SynExpr.Record(_, origExpr, fs, _) -> + | SynExpr.Record(_, origExpr, fs, _, _) -> (match origExpr with | Some(e, _) -> walkExpr e | None -> false) diff --git a/src/Compiler/SyntaxTree/SyntaxTrivia.fs b/src/Compiler/SyntaxTree/SyntaxTrivia.fs index 53ac39d5365..0a99828963d 100644 --- a/src/Compiler/SyntaxTree/SyntaxTrivia.fs +++ b/src/Compiler/SyntaxTree/SyntaxTrivia.fs @@ -138,7 +138,7 @@ type SynExprYieldOrReturnFromTrivia = type SynExprDoBangTrivia = { DoBangKeyword: range } [] -type SynExprAnonRecdTrivia = { OpeningBraceRange: range } +type SynExprRecdTrivia = { OpeningBraceRange: range; WithKeyword: range option } [] type SynExprSequentialTrivia = diff --git a/src/Compiler/SyntaxTree/SyntaxTrivia.fsi b/src/Compiler/SyntaxTree/SyntaxTrivia.fsi index c690a6ac018..bac415615ba 100644 --- a/src/Compiler/SyntaxTree/SyntaxTrivia.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTrivia.fsi @@ -190,10 +190,12 @@ type SynExprYieldOrReturnFromTrivia = /// Represents additional information for SynExpr.AnonRecd [] -type SynExprAnonRecdTrivia = +type SynExprRecdTrivia = { /// The syntax range of the `{|` token. OpeningBraceRange: range + /// The syntax range of the with keyword + WithKeyword: range option } /// Represents additional information for SynExpr.Sequential diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 54d3f0c190d..274556f7638 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -5552,14 +5552,16 @@ typarAlts: braceExpr: | LBRACE braceExprBody rbrace - { let m, r = $2 - r (rhs2 parseState 1 3) } + { let mOpen = rhs parseState 1 + let m, r = $2 + r mOpen (rhs2 parseState 1 3) } | LBRACE braceExprBody recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBrace()) + let mOpen = rhs parseState 1 let m, r = $2 // Note, we can't use 'exprFromParseError' because the extra syntax node interferes with some syntax-directed transformations for computation expressions - r (unionRanges (rhs parseState 1) m) } + r mOpen (unionRanges (rhs parseState 1) m) } | LBRACE error rbrace { // silent recovery @@ -5568,15 +5570,16 @@ braceExpr: | LBRACE recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBrace()) // Note, we can't use 'exprFromParseError' because the extra syntax node interferes with some syntax-directed transformations for computation expressions - SynExpr.Record(None, None, [], rhs parseState 1) } + SynExpr.Record(None, None, [], rhs parseState 1, { OpeningBraceRange = rhs parseState 1; WithKeyword = None }) } | LBRACE rbrace - { let m = rhs2 parseState 1 2 - SynExpr.Record(None, None, [], m) } + { let mOpen = rhs parseState 1 + let m = rhs2 parseState 1 2 + SynExpr.Record(None, None, [], m, { OpeningBraceRange = mOpen; WithKeyword = None }) } braceExprBody: | recdExpr - { (lhs parseState), (fun m -> let a, b, c = $1 in SynExpr.Record(a, b, c, m)) } + { (lhs parseState), (fun mOpen m -> let a, b, c, mWith = $1 in SynExpr.Record(a, b, c, m, { OpeningBraceRange = mOpen; WithKeyword = mWith })) } | objExpr { $1 } @@ -5600,7 +5603,7 @@ arrayExprElements: computationExpr: | sequentialExpr - { $1.Range, (fun mLhs -> SynExpr.ComputationExpr(false, $1, mLhs)) } + { $1.Range, (fun _ m -> SynExpr.ComputationExpr(false, $1, m)) } arrowThenExprR: | RARROW typedSequentialExprBlockR @@ -5681,11 +5684,11 @@ recdExpr: let l = rebindRanges (dummyField, None, None) l $6 let (SynExprRecordField(_, _, _, _, inheritsSep)) = List.head l let bindings = List.tail l - (Some($2, arg, rhs2 parseState 2 4, inheritsSep, rhs parseState 1), None, bindings) } + (Some($2, arg, rhs2 parseState 2 4, inheritsSep, rhs parseState 1), None, bindings, None) } | recdExprCore - { let a, b = $1 - None, a, b } + { let a, b, mWith = $1 + None, a, b, mWith } recdExprCore: | appExpr EQUALS declExprBlock recdExprBindings opt_seps_block @@ -5695,7 +5698,7 @@ recdExprCore: let mEquals = rhs parseState 2 let l = List.rev $4 let l = rebindRanges (f, Some mEquals, Some $3) l $5 - (None, l) + (None, l, None) | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsFieldBinding()) } | appExpr EQUALS recover @@ -5704,13 +5707,13 @@ recdExprCore: let f = mkRecdField f let mEquals = rhs parseState 2 let l = rebindRanges (f, Some mEquals, None) [] None - None, l + (None, l, None) | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsFieldBinding ()) } | appExpr { let mExpr = rhs parseState 1 reportParseErrorAt mExpr (FSComp.SR.parsFieldBinding ()) - (Some($1, None), []) } + (Some($1, None), [], None) } /* handles cases when identifier can start from the underscore @@ -5721,7 +5724,7 @@ recdExprCore: reportParseErrorAt m (FSComp.SR.parsUnderscoreInvalidFieldName()) reportParseErrorAt m (FSComp.SR.parsFieldBinding()) let f = mkUnderscoreRecdField m - (None, [ SynExprRecordField(f, None, None, m, None) ]) } + (None, [ SynExprRecordField(f, None, None, m, None) ], None) } | UNDERSCORE EQUALS { let m = rhs parseState 1 @@ -5730,7 +5733,7 @@ recdExprCore: let mEquals = rhs parseState 2 reportParseErrorAt (rhs2 parseState 1 2) (FSComp.SR.parsFieldBinding()) - (None, [ SynExprRecordField(f, Some mEquals, None, (rhs2 parseState 1 2), None) ]) } + (None, [ SynExprRecordField(f, Some mEquals, None, (rhs2 parseState 1 2), None) ], None) } | UNDERSCORE EQUALS declExprBlock recdExprBindings opt_seps_block { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnderscoreInvalidFieldName()) @@ -5738,7 +5741,24 @@ recdExprCore: let mEquals = rhs parseState 2 let l = List.rev $4 let l = rebindRanges (f, Some mEquals, Some $3) l $5 - (None, l) } + (None, l, None) } + +/* handles case like {x with} */ + | appExpr WITH recdBinding recdExprBindings opt_seps_block + { let l = List.rev $4 + let l = rebindRanges $3 l $5 + let mWith = rhs parseState 2 + (Some($1, $5), l, Some mWith) } + + | appExpr OWITH opt_seps_block OEND + { let mWith = rhs parseState 2 + (Some($1, $3), [], Some mWith) } + + | appExpr OWITH recdBinding recdExprBindings opt_seps_block OEND + { let l = List.rev $4 + let l = rebindRanges $3 l $5 + let mWith = rhs parseState 2 + (Some($1, $5), l, Some mWith) } opt_seps_block: | seps_block @@ -5819,16 +5839,16 @@ objExpr: { let mNewExpr = rhs parseState 1 let fullRange = match $4 with [] -> (rhs parseState 1) | _ -> (rhs2 parseState 1 4) let mWithKwd, bindings, members = $2 - fullRange, (fun m -> let (a, b) = $1 in SynExpr.ObjExpr(a, b, Some mWithKwd, bindings, members, $4, mNewExpr, m)) } + fullRange, (fun _ m -> let (a, b) = $1 in SynExpr.ObjExpr(a, b, Some mWithKwd, bindings, members, $4, mNewExpr, m)) } | objExprBaseCall opt_OBLOCKSEP objExprInterfaces { let mNewExpr = rhs parseState 1 let fullRange = match $3 with [] -> (rhs parseState 1) | _ -> (rhs2 parseState 1 3) - fullRange, (fun m -> let (a, b) = $1 in SynExpr.ObjExpr(a, b, None, [], [], $3, mNewExpr, m)) } + fullRange, (fun _ m -> let (a, b) = $1 in SynExpr.ObjExpr(a, b, None, [], [], $3, mNewExpr, m)) } | NEW atomTypeNonAtomicDeprecated { let mNewExpr = rhs parseState 1 - (rhs2 parseState 1 2), (fun m -> let (a, b) = $2, None in SynExpr.ObjExpr(a, b, None, [], [], [], mNewExpr, m)) } + (rhs2 parseState 1 2), (fun _ m -> let (a, b) = $2, None in SynExpr.ObjExpr(a, b, None, [], [], [], mNewExpr, m)) } objExprBaseCall: | NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType baseSpec @@ -5904,7 +5924,7 @@ braceBarExpr: braceBarExprCore: | LBRACE_BAR recdExprCore bar_rbrace - { let orig, flds = $2 + { let orig, flds, mWith = $2 let flds = flds |> List.choose (function | SynExprRecordField((synLongIdent, _), mEquals, Some e, _, _) when orig.IsSome -> Some(synLongIdent, mEquals, e) // copy-and-update, long identifier signifies nesting @@ -5915,11 +5935,11 @@ braceBarExprCore: let mRightBrace = rhs parseState 3 (fun (mStruct: range option) -> let m = match mStruct with | None -> unionRanges mLeftBrace mRightBrace | Some mStruct -> unionRanges mStruct mRightBrace - SynExpr.AnonRecd(mStruct.IsSome, orig, flds, m, { OpeningBraceRange = mLeftBrace })) } + SynExpr.AnonRecd(mStruct.IsSome, orig, flds, m, { OpeningBraceRange = mLeftBrace; WithKeyword = mWith })) } | LBRACE_BAR recdExprCore recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBraceBar()) - let orig, flds = $2 + let orig, flds, mWith = $2 let flds = flds |> List.map (function | SynExprRecordField((synLongIdent, _), mEquals, Some e, _, _) -> (synLongIdent, mEquals, e) @@ -5928,7 +5948,7 @@ braceBarExprCore: let mExpr = rhs parseState 2 (fun (mStruct: range option) -> let m = match mStruct with | None -> unionRanges mLeftBrace mExpr | Some mStruct -> unionRanges mStruct mExpr - SynExpr.AnonRecd(mStruct.IsSome, orig, flds, m, { OpeningBraceRange = mLeftBrace })) } + SynExpr.AnonRecd(mStruct.IsSome, orig, flds, m, { OpeningBraceRange = mLeftBrace; WithKeyword = mWith })) } | LBRACE_BAR error bar_rbrace { // silent recovery @@ -5943,14 +5963,14 @@ braceBarExprCore: let mLeftBrace = rhs parseState 1 (fun (mStruct: range option) -> let m = match mStruct with | None -> mLeftBrace | Some mStruct -> unionRanges mStruct mLeftBrace - SynExpr.AnonRecd(mStruct.IsSome, None, [], m, { OpeningBraceRange = mLeftBrace })) } + SynExpr.AnonRecd(mStruct.IsSome, None, [], m, { OpeningBraceRange = mLeftBrace; WithKeyword = None })) } | LBRACE_BAR bar_rbrace { let mLeftBrace = rhs parseState 1 let mRightBrace = rhs parseState 2 (fun (mStruct: range option) -> let m = match mStruct with | None -> unionRanges mLeftBrace mRightBrace | Some mStruct -> unionRanges mStruct mRightBrace - SynExpr.AnonRecd(mStruct.IsSome, None, [], m, { OpeningBraceRange = mLeftBrace })) } + SynExpr.AnonRecd(mStruct.IsSome, None, [], m, { OpeningBraceRange = mLeftBrace; WithKeyword = None })) } anonLambdaExpr: | FUN atomicPatterns RARROW typedSequentialExprBlock diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl index 569e80de10b..b11331ca4fe 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.bsl @@ -7005,8 +7005,8 @@ FSharp.Compiler.Syntax.SynExpr+AddressOf: FSharp.Compiler.Text.Range opRange FSharp.Compiler.Syntax.SynExpr+AddressOf: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+AnonRecd: Boolean get_isStruct() FSharp.Compiler.Syntax.SynExpr+AnonRecd: Boolean isStruct -FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia get_trivia() -FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia trivia +FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia get_trivia() +FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia trivia FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynLongIdent,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynExpr]] get_recordFields() @@ -7405,6 +7405,8 @@ FSharp.Compiler.Syntax.SynExpr+Quote: FSharp.Compiler.Syntax.SynExpr operator FSharp.Compiler.Syntax.SynExpr+Quote: FSharp.Compiler.Syntax.SynExpr quotedExpr FSharp.Compiler.Syntax.SynExpr+Quote: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Quote: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynExpr+Record: FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia get_trivia() +FSharp.Compiler.Syntax.SynExpr+Record: FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia trivia FSharp.Compiler.Syntax.SynExpr+Record: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Record: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordField] get_recordFields() @@ -7759,7 +7761,7 @@ FSharp.Compiler.Syntax.SynExpr: Boolean get_IsWhileBang() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsYieldOrReturn() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsYieldOrReturnFrom() FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAddressOf(Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAnonRecd(Boolean, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]], Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynLongIdent,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynExpr]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAnonRecd(Boolean, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]], Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynLongIdent,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range],FSharp.Compiler.Syntax.SynExpr]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewApp(FSharp.Compiler.Syntax.ExprAtomicFlag, Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewArbitraryAfterError(System.String, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewArrayOrList(Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr], FSharp.Compiler.Text.Range) @@ -7810,7 +7812,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewNull(FSharp.Co FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewObjExpr(FSharp.Compiler.Syntax.SynType, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.Ident]]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynMemberDefn], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynInterfaceImpl], FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewParen(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewQuote(FSharp.Compiler.Syntax.SynExpr, Boolean, FSharp.Compiler.Syntax.SynExpr, Boolean, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewRecord(Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Syntax.SynType,FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator],FSharp.Compiler.Text.Range]], Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordField], FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewRecord(Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Syntax.SynType,FSharp.Compiler.Syntax.SynExpr,FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator],FSharp.Compiler.Text.Range]], Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.BlockSeparator]]], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordField], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewSequential(FSharp.Compiler.Syntax.DebugPointAtSequential, Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprSequentialTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewSequentialOrImplicitYield(FSharp.Compiler.Syntax.DebugPointAtSequential, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewSet(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) @@ -10308,10 +10310,6 @@ FSharp.Compiler.SyntaxTrivia.SynEnumCaseTrivia: Microsoft.FSharp.Core.FSharpOpti FSharp.Compiler.SyntaxTrivia.SynEnumCaseTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_BarRange() FSharp.Compiler.SyntaxTrivia.SynEnumCaseTrivia: System.String ToString() FSharp.Compiler.SyntaxTrivia.SynEnumCaseTrivia: Void .ctor(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range) -FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia: FSharp.Compiler.Text.Range OpeningBraceRange -FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia: FSharp.Compiler.Text.Range get_OpeningBraceRange() -FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia: System.String ToString() -FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia: Void .ctor(FSharp.Compiler.Text.Range) FSharp.Compiler.SyntaxTrivia.SynExprDoBangTrivia: FSharp.Compiler.Text.Range DoBangKeyword FSharp.Compiler.SyntaxTrivia.SynExprDoBangTrivia: FSharp.Compiler.Text.Range get_DoBangKeyword() FSharp.Compiler.SyntaxTrivia.SynExprDoBangTrivia: System.String ToString() @@ -10362,6 +10360,12 @@ FSharp.Compiler.SyntaxTrivia.SynExprMatchTrivia: FSharp.Compiler.Text.Range get_ FSharp.Compiler.SyntaxTrivia.SynExprMatchTrivia: FSharp.Compiler.Text.Range get_WithKeyword() FSharp.Compiler.SyntaxTrivia.SynExprMatchTrivia: System.String ToString() FSharp.Compiler.SyntaxTrivia.SynExprMatchTrivia: Void .ctor(FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range) +FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia: FSharp.Compiler.Text.Range OpeningBraceRange +FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia: FSharp.Compiler.Text.Range get_OpeningBraceRange() +FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] WithKeyword +FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_WithKeyword() +FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia: System.String ToString() +FSharp.Compiler.SyntaxTrivia.SynExprRecdTrivia: Void .ctor(FSharp.Compiler.Text.Range, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range]) FSharp.Compiler.SyntaxTrivia.SynExprSequentialTrivia: FSharp.Compiler.SyntaxTrivia.SynExprSequentialTrivia Zero FSharp.Compiler.SyntaxTrivia.SynExprSequentialTrivia: FSharp.Compiler.SyntaxTrivia.SynExprSequentialTrivia get_Zero() FSharp.Compiler.SyntaxTrivia.SynExprSequentialTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] SeparatorRange diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl index 470ea6b368f..6d506c23672 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl @@ -15,20 +15,20 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo::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::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo::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::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::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::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::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. @@ -42,13 +42,13 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -58,15 +58,15 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize::Invoke([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+RowKind)][offset 0x00000128][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 9a9e0b97a9f..8dbbcbea8b9 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -15,11 +15,18 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x0000008A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000026] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000070] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000011][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001D][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000008B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000094][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000069][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+dataTipOfReferences::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. @@ -28,19 +35,12 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001E5][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo::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::Invoke(object)][offset 0x00000007] Unmanaged pointers are not a verifiable type. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues::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::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::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo::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::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::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::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::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::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000015][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000011][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000E6][found Char] Unexpected type on the stack. @@ -59,7 +59,7 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000062B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x00000634][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000065][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x00000015][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000BE][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000033][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000063][found Char] Unexpected type on the stack. @@ -67,8 +67,8 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x00000099][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000057][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000060][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001220][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001229][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011D7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x000011E0][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000063F][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter+bigness::Invoke(int32)][offset 0x00000007][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000090][found Char] Unexpected type on the stack. @@ -83,15 +83,15 @@ [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x00000048][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000028][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+Pipe #6 input ::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x0000034D][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000CD][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000037][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000043][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003F][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl index e29bd8bbaec..84a46faa9e6 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl @@ -15,30 +15,30 @@ [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+GetReferenceResolutionStructuredToolTipText::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000007C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo::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::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::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::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::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::parseOption(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getSwitch(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::attempt([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000A99][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+parseOption::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getSwitch::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000CA9][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerConfig+TcConfig::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, bool)][offset 0x0000059C][found Char] Unexpected type on the stack. @@ -46,16 +46,16 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000A8][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AC][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x0000008E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x0000004B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000054][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001182][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x0000118B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B21][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x000004E2][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000071][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x00001182][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x0000118B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B8C][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000050D][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000073][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+pushShadowedLocals::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000001C0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000080][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x000000A1][found Byte] Unexpected type on the stack. @@ -74,26 +74,26 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000038][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000058][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadGenericParamConstraintIdx([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+ILMetadataReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, int32)][offset 0x00000025][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::rowKindSize$cont(bool, bool, bool, bool[], bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000E5][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B6][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B4][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadInterfaceImpls::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadGenericParamConstraints::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+enclIdx::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadMethodImpls::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadEvents::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadProperties::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000FD][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000041][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array::loop(bool[], int32)][offset 0x00000008][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array+loop::Invoke(int32)][offset 0x00000012][found Byte] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index 0ffe02881a3..955cf80dcac 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -15,45 +15,45 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullDisplayName()][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpEntity::TryGetFullCompiledName()][offset 0x00000024][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue::TryGetFullCompiledOperatorNameIdents()][offset 0x00000060][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue+fullName::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadKeyString([System.Reflection.Metadata]System.Reflection.Metadata.BlobReader&)][offset 0x00000023] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [ReturnPtrToStack]: : FSharp.Compiler.CodeAnalysis.ItemKeyStore::ReadFirstKeyString()][offset 0x00000064] Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.ItemKeyStoreBuilder::writeRange([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000017][found address of '[FSharp.Compiler.Service]FSharp.Compiler.Text.Range'][expected Native Int] Unexpected type on the stack. [IL]: Error [ExpectedNumericType]: : FSharp.Compiler.EditorServices.SemanticClassificationKeyStoreBuilder::WriteAll([FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem[])][offset 0x0000001C][found address of '[FSharp.Compiler.Service]FSharp.Compiler.EditorServices.SemanticClassificationItem'] Expected numeric type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x0000003F][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000006D][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Tokenization.FSharpLineTokenizer+clo::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000076][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.Parent::FormatEntityFullName([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpEntity)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.TypeCheckInfo+GetReferenceResolutionStructuredToolTipText::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000007C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::.ctor([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, int32, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.FSharpOption`1>>, bool, bool, bool, bool, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+ParallelReferenceResolution, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1>>>, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A4][found ref 'object'][expected ref '[FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.IBackgroundCompiler'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.FSharpChecker::TokenizeFile(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000005C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000065][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x00000082][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.Hosted.CompilerHelpers::fscCompile([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyReferenceResolver, string, string[])][offset 0x0000008B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000032][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinSyphon::GetLine(string, int32)][offset 0x00000039][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+MagicAssemblyResolution::ResolveAssemblyCore([FSharp.Compiler.Service]Internal.Utilities.Library.CompilationThreadToken, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, [FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, [FSharp.Compiler.Service]FSharp.Compiler.CompilerImports+TcImports, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiDynamicCompiler, [FSharp.Compiler.Service]FSharp.Compiler.Interactive.Shell+FsiConsoleOutput, string)][offset 0x00000015][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+clo::Invoke([S.P.CoreLib]System.Tuple`3)][offset 0x000001C7][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Interactive.Shell+FsiStdinLexerProvider+clo::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::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000004C][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity::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::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$ServiceLexing+clo::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::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::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::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::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::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000030][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Driver+ProcessCommandLineFlags::Invoke(string)][offset 0x00000014][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000010][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CreateILModule+MainModuleBuilder::ConvertProductVersionToILVersionInfo(string)][offset 0x00000017][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.StaticLinking+TypeForwarding::followTypeForwardForILTypeRef([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILTypeRef)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getCompilerOption([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1)][offset 0x000000A7][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::parseOption(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getOptionArgList([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::getSwitch(string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::attempt([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000A99][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::processArg([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x0000003E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::AddPathMapping([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string)][offset 0x0000000B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions::subSystemVersionSwitch$cont([FSharp.Compiler.Service]FSharp.Compiler.CompilerConfig+TcConfigBuilder, string, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnderflow]: : FSharp.Compiler.CompilerOptions::DoWithColor([System.Console]System.ConsoleColor, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000005E] Stack underflow. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+parseOption::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000049][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getOptionArgList::Invoke([FSharp.Compiler.Service]FSharp.Compiler.CompilerOptions+CompilerOption, string)][offset 0x00000052][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+getSwitch::Invoke(string)][offset 0x0000000B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+attempt::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x00000CA9][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+processArg::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1)][offset 0x0000003F][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+subSystemVersionSwitch::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000010][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.CompilerOptions+ResponseFile+parseLine::Invoke(string)][offset 0x00000026][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode::Invoke(int32)][offset 0x00000031][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.ParseAndCheckInputs+CheckMultipleInputsUsingGraphMode::Invoke(int32)][offset 0x0000003A][found Char] Unexpected type on the stack. @@ -64,19 +64,19 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000011][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,int32>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IlxGen::HashRangeSorted([S.P.CoreLib]System.Collections.Generic.IDictionary`2>)][offset 0x00000012][found ref '[FSharp.Compiler.Service]FSharp.Compiler.IlxGen+HashRangeSorted'][expected ref '[FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,T0>'] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::isProblematicClause([FSharp.Compiler.Service]FSharp.Compiler.PatternMatchCompilation+MatchClause)][offset 0x00000040][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.PatternMatchCompilation::.cctor()][offset 0x0000000B][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.PatternMatchCompilation::staticInitialization@()][offset 0x0000000B][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+TastDefinitionPrinting+meths::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Infos+MethInfo)][offset 0x000000B3][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.NicePrint+PrintUtilities::layoutXmlDoc([FSharp.Compiler.Service]FSharp.Compiler.TypedTreeOps+DisplayEnv, bool, [FSharp.Compiler.Service]FSharp.Compiler.Xml.XmlDoc, [FSharp.Compiler.Service]FSharp.Compiler.Text.Layout)][offset 0x00000034][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateNamespaceName(string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1, [FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string)][offset 0x00000074][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000A8][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.TypeProviders::ValidateExpectedName([FSharp.Compiler.Service]FSharp.Compiler.Text.Range, string[], string, [FSharp.Compiler.Service]FSharp.Compiler.Tainted`1)][offset 0x000000AC][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Lexhelp::stringBufferAsString([FSharp.Compiler.Service]FSharp.Compiler.IO.ByteBuffer)][offset 0x0000008E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x0000004B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::SplitNamesForILPath(string)][offset 0x00000054][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x00001182][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.Syntax.PrettyNaming::.cctor()][offset 0x0000118B][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B21][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x000004E2][found Boolean] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000071][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x00001182][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.Syntax.PrettyNaming::staticInitialization@()][offset 0x0000118B][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x00000B8C][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryWriter::writeILMetadataAndCode(bool, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILVersionInfo, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILGlobals, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, [S.P.CoreLib]System.Collections.Generic.IEnumerable`1, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.IL+ILModuleDef, int32, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2)][offset 0x0000050D][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+PortablePdbGenerator::serializeDocumentName(string)][offset 0x00000073][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILPdbWriter+pushShadowedLocals::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000001C0][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000080][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadTypeDefRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x000000A1][found Byte] Unexpected type on the stack. @@ -95,31 +95,31 @@ [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000038][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadNestedRowUncached([FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>, int32)][offset 0x00000058][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::seekReadGenericParamConstraintIdx([FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+ILMetadataReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, int32)][offset 0x00000025][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::rowKindSize$cont(bool, bool, bool, bool[], bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000E5][found Byte] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B6][found Boolean] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader::openMetadataReader(string, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+BinaryFile, int32, [S.P.CoreLib]System.Tuple`8,bool,bool,bool,bool,bool,System.Tuple`5,bool,int32,int32,int32>>, [FSharp.Compiler.Service]FSharp.Compiler.AbstractIL.ILBinaryReader+PEReader, [FSharp.Compiler.Service]FSharp.Compiler.IO.ReadOnlyByteMemory, [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1, bool)][offset 0x000006B4][found Boolean] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadInterfaceImpls::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadGenericParamConstraints::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+enclIdx::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadMethodImpls::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadEvents::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+seekReadProperties::Invoke(int32)][offset 0x0000002F][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.ILBinaryReader+rowKindSize::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x000000FD][found Byte] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.NativeRes+VersionHelper::TryParse(string, bool, uint16, bool, [S.P.CoreLib]System.Version&)][offset 0x00000026][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseILVersion(string)][offset 0x00000021][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL::parseNamed(uint8[], [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x0000007E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.AbstractIL.IL+parseNamed::Invoke([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>, int32, int32)][offset 0x0000008D][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Collections.Utils::shortPath(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment::probePathForDotnetHost([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x000002F5][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$FSharp.Compiler.DiagnosticsLogger::.cctor()][offset 0x000000B6][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.FSharpEnvironment+probePathForDotnetHost::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x0000002A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.CodeAnalysis.SimulatedMSBuildReferenceResolver+SimulatedMSBuildResolver::FSharp.Compiler.CodeAnalysis.ILegacyReferenceResolver.Resolve([FSharp.Compiler.Service]FSharp.Compiler.CodeAnalysis.LegacyResolutionEnvironment, [S.P.CoreLib]System.Tuple`2[], string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, string, [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, string, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>)][offset 0x000002F8][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.DiagnosticsLogger::staticInitialization@()][offset 0x00000066][found Char] Unexpected type on the stack. [IL]: Error [CallVirtOnValueType]: : FSharp.Compiler.Text.RangeModule+comparer::System.Collections.Generic.IEqualityComparer.GetHashCode([FSharp.Compiler.Service]FSharp.Compiler.Text.Range)][offset 0x00000002] Callvirt on a value type method. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000035][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.PathMapModule::applyDir([FSharp.Compiler.Service]Internal.Utilities.PathMap, string)][offset 0x00000041][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000000A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000013][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000001C][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x00000025][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : .$Internal.Utilities.XmlAdapters::.cctor()][offset 0x0000002E][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000000A][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000013][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000001C][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x00000025][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.XmlAdapters::staticInitialization@()][offset 0x0000002E][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x0000000B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.IO.FileSystemUtils::trimQuotes(string)][offset 0x00000014][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : Internal.Utilities.Library.String::lowerCaseFirstChar(string)][offset 0x0000003A][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array::loop(bool[], int32)][offset 0x00000008][found Byte] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : Internal.Utilities.Library.Array+loop::Invoke(int32)][offset 0x00000012][found Byte] Unexpected type on the stack. diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl index 7f3dd8badf2..2985794e7cc 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl @@ -22,7 +22,8 @@ ImplFile (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)); + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,20)); Expr (AnonRecd (false, None, @@ -41,7 +42,8 @@ ImplFile (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)); + { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,20)); Expr (AnonRecd (false, None, @@ -60,7 +62,8 @@ ImplFile (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))], + { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl index a17975ba1da..80c4a8aeb30 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl @@ -22,7 +22,8 @@ ImplFile (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)); + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,22)); Expr (AnonRecd (false, None, @@ -41,7 +42,8 @@ ImplFile (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)); + { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,22)); Expr (AnonRecd (false, None, @@ -60,7 +62,8 @@ ImplFile (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))], + { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl index 91f4963b53c..1a1ca0de1af 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl @@ -28,7 +28,8 @@ ImplFile 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)); + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,40)); Expr (AnonRecd (false, None, @@ -53,7 +54,8 @@ ImplFile 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)); + { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,40)); Expr (AnonRecd (false, None, @@ -78,7 +80,8 @@ ImplFile 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))], + { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl index 5577001a81e..39caf168a81 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl @@ -14,14 +14,16 @@ ImplFile 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) })); + (3,11--3,31), { OpeningBraceRange = (3,11--3,13) + WithKeyword = None })); (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)); + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,57)); Expr (AnonRecd (false, None, @@ -32,14 +34,16 @@ ImplFile 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) })); + (5,10--5,30), { OpeningBraceRange = (5,10--5,12) + WithKeyword = None })); (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)); + { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,57)); Expr (AnonRecd (false, None, @@ -50,14 +54,16 @@ ImplFile 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) })); + (7,11--7,31), { OpeningBraceRange = (7,11--7,13) + WithKeyword = None })); (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))], + { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl index 817ef5b3eac..7b0af1c32e6 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl @@ -9,33 +9,39 @@ ImplFile (false, None, [(SynLongIdent ([X], [], [None]), Some (1,5--1,6), Const (Int32 1, (1,7--1,8)))], (1,0--1,11), - { OpeningBraceRange = (1,0--1,2) }), (1,0--1,11)); + { OpeningBraceRange = (1,0--1,2) + WithKeyword = None }), (1,0--1,11)); Expr (AnonRecd (true, None, [(SynLongIdent ([Y], [], [None]), Some (2,12--2,13), Const (Int32 2, (2,14--2,15)))], (2,0--2,18), - { OpeningBraceRange = (2,7--2,9) }), (2,0--2,18)); + { OpeningBraceRange = (2,7--2,9) + WithKeyword = None }), (2,0--2,18)); Expr (AnonRecd - (false, None, [], (3,0--3,5), { OpeningBraceRange = (3,0--3,2) }), + (false, None, [], (3,0--3,5), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,5)); Expr (AnonRecd - (true, None, [], (4,0--4,12), { OpeningBraceRange = (4,7--4,9) }), + (true, None, [], (4,0--4,12), { OpeningBraceRange = (4,7--4,9) + WithKeyword = None }), (4,0--4,12)); Expr (AnonRecd (false, Some (Null (5,3--5,7), None), [], (5,0--5,10), - { OpeningBraceRange = (5,0--5,2) }), (5,0--5,10)); + { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,10)); Expr (AnonRecd (true, Some (Null (6,10--6,14), None), [], (6,0--6,17), - { OpeningBraceRange = (6,7--6,9) }), (6,0--6,17))], - PreXmlDocEmpty, [], None, (1,0--6,17), { LeadingKeyword = None })], - (true, true), { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + { OpeningBraceRange = (6,7--6,9) + WithKeyword = None }), (6,0--6,17))], PreXmlDocEmpty, [], + None, (1,0--6,17), { LeadingKeyword = None })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) (5,3)-(5,7) parse error Field bindings must have the form 'id = expr;' (6,10)-(6,14) parse error Field bindings must have the form 'id = expr;' diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl index fc0a410b79e..44dbbfdfc22 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl @@ -9,11 +9,12 @@ ImplFile (false, None, [(SynLongIdent ([X], [], [None]), Some (1,5--1,6), Const (Int32 0, (1,7--1,8)))], (1,0--2,0), - { OpeningBraceRange = (1,0--1,2) }), (1,0--2,0))], - PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], - (true, true), { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + { OpeningBraceRange = (1,0--1,2) + WithKeyword = None }), (1,0--2,0))], PreXmlDocEmpty, [], None, + (1,0--2,0), { LeadingKeyword = None })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) (1,0)-(1,2) parse error Unmatched '{|' (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'AnonymousRecords-02' based on the file name 'AnonymousRecords-02.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl index 4582e5eca53..00856eafc42 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl @@ -9,11 +9,12 @@ ImplFile (true, None, [(SynLongIdent ([X], [], [None]), Some (1,12--1,13), Const (Int32 0, (1,14--1,15)))], (1,0--2,0), - { OpeningBraceRange = (1,7--1,9) }), (1,0--2,0))], - PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], - (true, true), { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + { OpeningBraceRange = (1,7--1,9) + WithKeyword = None }), (1,0--2,0))], PreXmlDocEmpty, [], None, + (1,0--2,0), { LeadingKeyword = None })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) (1,7)-(1,9) parse error Unmatched '{|' (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'AnonymousRecords-03' based on the file name 'AnonymousRecords-03.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl index 64a376f178c..3494044a6c8 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-04.fs.bsl @@ -6,7 +6,8 @@ ImplFile ([AnonymousRecords-04], false, AnonModule, [Expr (AnonRecd - (false, None, [], (1,0--1,2), { OpeningBraceRange = (1,0--1,2) }), + (false, None, [], (1,0--1,2), { OpeningBraceRange = (1,0--1,2) + WithKeyword = None }), (1,0--1,2))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl index 38eb618a0ed..13cf17b7359 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-05.fs.bsl @@ -6,12 +6,12 @@ ImplFile ([AnonymousRecords-05], false, AnonModule, [Expr (AnonRecd - (true, None, [], (1,0--1,9), { OpeningBraceRange = (1,7--1,9) }), - (1,0--1,9))], PreXmlDocEmpty, [], None, (1,0--2,0), - { LeadingKeyword = None })], (true, true), - { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + (true, None, [], (1,0--1,9), { OpeningBraceRange = (1,7--1,9) + WithKeyword = None }), (1,0--1,9))], + PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) (1,7)-(1,9) parse error Unmatched '{|' (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'AnonymousRecords-05' based on the file name 'AnonymousRecords-05.fs'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl index 64f783a7822..41af603780a 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl @@ -25,10 +25,11 @@ ImplFile Const (String ("s", Regular, (1,26--1,29)), (1,26--1,29))); (SynLongIdent ([A], [], [None]), Some (1,33--1,34), Const (Int32 3, (1,35--1,36)))], (1,10--1,39), - { OpeningBraceRange = (1,10--1,12) }), (1,4--1,7), - NoneAtLet, { LeadingKeyword = Let (1,0--1,3) - InlineKeyword = None - EqualsRange = Some (1,8--1,9) })], (1,0--1,39))], + { OpeningBraceRange = (1,10--1,12) + WithKeyword = Some (1,15--1,19) }), (1,4--1,7), NoneAtLet, + { LeadingKeyword = Let (1,0--1,3) + InlineKeyword = None + EqualsRange = Some (1,8--1,9) })], (1,0--1,39))], PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] WarnDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl index a8ff99d1b82..1681cfd69de 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl @@ -14,7 +14,8 @@ ImplFile Seq ([Named ([m], (3,6--3,7))], (3,6--3,7)), { LessRange = (3,5--3,6) GreaterRange = (3,7--3,8) }), (3,4--3,8)))], - (3,0--3,11), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,11)); + (3,0--3,11), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,11)); Expr (AnonRecd (false, None, @@ -25,7 +26,8 @@ ImplFile Seq ([Named ([m], (5,6--5,7))], (5,6--5,7)), { LessRange = (5,5--5,6) GreaterRange = (5,7--5,8) }), (5,4--5,8)))], - (5,0--5,10), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,10)); + (5,0--5,10), { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,10)); Expr (AnonRecd (false, None, @@ -36,7 +38,8 @@ ImplFile Seq ([Named ([m], (7,7--7,8))], (7,7--7,8)), { LessRange = (7,6--7,7) GreaterRange = (7,8--7,9) }), (7,5--7,9)))], - (7,0--7,11), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,11)); + (7,0--7,11), { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (7,0--7,11)); Expr (AnonRecd (false, None, @@ -47,7 +50,8 @@ ImplFile Seq ([Named ([m], (9,7--9,8))], (9,7--9,8)), { LessRange = (9,6--9,7) GreaterRange = (9,8--9,9) }), (9,5--9,9)))], - (9,0--9,12), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,12))], + (9,0--9,12), { OpeningBraceRange = (9,0--9,2) + WithKeyword = None }), (9,0--9,12))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl index ed640191c59..0767149d6bb 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl @@ -21,7 +21,8 @@ ImplFile Seq ([Named ([m], (3,14--3,15))], (3,14--3,15)), { LessRange = (3,13--3,14) GreaterRange = (3,15--3,16) }), (3,12--3,16)))], - (3,0--3,19), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,19)); + (3,0--3,19), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,19)); Expr (AnonRecd (false, None, @@ -39,7 +40,8 @@ ImplFile Seq ([Named ([m], (5,14--5,15))], (5,14--5,15)), { LessRange = (5,13--5,14) GreaterRange = (5,15--5,16) }), (5,12--5,16)))], - (5,0--5,18), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,18)); + (5,0--5,18), { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,18)); Expr (AnonRecd (false, None, @@ -57,7 +59,8 @@ ImplFile Seq ([Named ([m], (7,15--7,16))], (7,15--7,16)), { LessRange = (7,14--7,15) GreaterRange = (7,16--7,17) }), (7,13--7,17)))], - (7,0--7,19), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,19)); + (7,0--7,19), { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (7,0--7,19)); Expr (AnonRecd (false, None, @@ -75,7 +78,8 @@ ImplFile Seq ([Named ([m], (9,15--9,16))], (9,15--9,16)), { LessRange = (9,14--9,15) GreaterRange = (9,16--9,17) }), (9,13--9,17)))], - (9,0--9,20), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,20))], + (9,0--9,20), { OpeningBraceRange = (9,0--9,2) + WithKeyword = None }), (9,0--9,20))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,20), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl index ec7c2e4e312..492acd7d374 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl @@ -12,7 +12,8 @@ ImplFile (Ident typeof, (3,10--3,11), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (3,14--3,15), (3,10--3,15), (3,4--3,15)))], - (3,0--3,17), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,17)); + (3,0--3,17), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,17)); Expr (AnonRecd (false, None, @@ -21,7 +22,8 @@ ImplFile (Ident typeof, (5,10--5,11), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (5,14--5,15), (5,10--5,15), (5,4--5,15)))], - (5,0--5,18), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,18)); + (5,0--5,18), { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,18)); Expr (AnonRecd (false, None, @@ -30,7 +32,8 @@ ImplFile (Ident typeof, (7,11--7,12), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (7,15--7,16), (7,11--7,16), (7,5--7,16)))], - (7,0--7,18), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,18)); + (7,0--7,18), { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (7,0--7,18)); Expr (AnonRecd (false, None, @@ -39,7 +42,8 @@ ImplFile (Ident typeof, (9,11--9,12), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (9,15--9,16), (9,11--9,16), (9,5--9,16)))], - (9,0--9,19), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,19))], + (9,0--9,19), { OpeningBraceRange = (9,0--9,2) + WithKeyword = None }), (9,0--9,19))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,19), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl index a30127b522f..b8d10816f50 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl @@ -14,7 +14,8 @@ ImplFile (LongIdent (SynLongIdent ([option], [], [None])), None, [Anon (3,14--3,15)], [], None, true, (3,14--3,22))], [], Some (3,22--3,23), (3,13--3,23), (3,4--3,23)))], - (3,0--3,25), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,25)); + (3,0--3,25), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,25)); Expr (AnonRecd (false, None, @@ -25,7 +26,8 @@ ImplFile (LongIdent (SynLongIdent ([option], [], [None])), None, [Anon (5,14--5,15)], [], None, true, (5,14--5,22))], [], Some (5,22--5,23), (5,13--5,23), (5,4--5,23)))], - (5,0--5,26), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,26)); + (5,0--5,26), { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,26)); Expr (AnonRecd (false, None, @@ -36,7 +38,8 @@ ImplFile (LongIdent (SynLongIdent ([option], [], [None])), None, [Anon (7,15--7,16)], [], None, true, (7,15--7,23))], [], Some (7,23--7,24), (7,14--7,24), (7,5--7,24)))], - (7,0--7,26), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,26)); + (7,0--7,26), { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (7,0--7,26)); Expr (AnonRecd (false, None, @@ -47,7 +50,8 @@ ImplFile (LongIdent (SynLongIdent ([option], [], [None])), None, [Anon (9,15--9,16)], [], None, true, (9,15--9,23))], [], Some (9,23--9,24), (9,14--9,24), (9,5--9,24)))], - (9,0--9,27), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,27))], + (9,0--9,27), { OpeningBraceRange = (9,0--9,2) + WithKeyword = None }), (9,0--9,27))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,27), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl index 180ed425c9e..7fd6c04d1a1 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl @@ -28,11 +28,11 @@ ImplFile (Ident nameof, (3,22--3,23), [Var (SynTypar (T, None, false), (3,23--3,25))], [], Some (3,25--3,26), (3,22--3,26), (3,16--3,26)))], - (3,12--3,28), { OpeningBraceRange = (3,12--3,14) }), - (3,4--3,9), NoneAtLet, { LeadingKeyword = Let (3,0--3,3) - InlineKeyword = None - EqualsRange = Some (3,10--3,11) })], - (3,0--3,28)); + (3,12--3,28), { OpeningBraceRange = (3,12--3,14) + WithKeyword = None }), (3,4--3,9), + NoneAtLet, { LeadingKeyword = Let (3,0--3,3) + InlineKeyword = None + EqualsRange = Some (3,10--3,11) })], (3,0--3,28)); Let (false, [SynBinding @@ -57,11 +57,11 @@ ImplFile (Ident nameof, (5,22--5,23), [Var (SynTypar (T, None, false), (5,23--5,25))], [], Some (5,25--5,26), (5,22--5,26), (5,16--5,26)))], - (5,12--5,29), { OpeningBraceRange = (5,12--5,14) }), - (5,4--5,9), NoneAtLet, { LeadingKeyword = Let (5,0--5,3) - InlineKeyword = None - EqualsRange = Some (5,10--5,11) })], - (5,0--5,29)); + (5,12--5,29), { OpeningBraceRange = (5,12--5,14) + WithKeyword = None }), (5,4--5,9), + NoneAtLet, { LeadingKeyword = Let (5,0--5,3) + InlineKeyword = None + EqualsRange = Some (5,10--5,11) })], (5,0--5,29)); Let (false, [SynBinding @@ -86,11 +86,11 @@ ImplFile (Ident nameof, (7,23--7,24), [Var (SynTypar (T, None, false), (7,24--7,26))], [], Some (7,26--7,27), (7,23--7,27), (7,17--7,27)))], - (7,12--7,29), { OpeningBraceRange = (7,12--7,14) }), - (7,4--7,9), NoneAtLet, { LeadingKeyword = Let (7,0--7,3) - InlineKeyword = None - EqualsRange = Some (7,10--7,11) })], - (7,0--7,29)); + (7,12--7,29), { OpeningBraceRange = (7,12--7,14) + WithKeyword = None }), (7,4--7,9), + NoneAtLet, { LeadingKeyword = Let (7,0--7,3) + InlineKeyword = None + EqualsRange = Some (7,10--7,11) })], (7,0--7,29)); Let (false, [SynBinding @@ -115,11 +115,11 @@ ImplFile (Ident nameof, (9,23--9,24), [Var (SynTypar (T, None, false), (9,24--9,26))], [], Some (9,26--9,27), (9,23--9,27), (9,17--9,27)))], - (9,12--9,30), { OpeningBraceRange = (9,12--9,14) }), - (9,4--9,9), NoneAtLet, { LeadingKeyword = Let (9,0--9,3) - InlineKeyword = None - EqualsRange = Some (9,10--9,11) })], - (9,0--9,30))], + (9,12--9,30), { OpeningBraceRange = (9,12--9,14) + WithKeyword = None }), (9,4--9,9), + NoneAtLet, { LeadingKeyword = Let (9,0--9,3) + InlineKeyword = None + EqualsRange = Some (9,10--9,11) })], (9,0--9,30))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,30), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl index 1de6c8767d2..40afec40d29 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl @@ -12,7 +12,8 @@ ImplFile (Ident id, (3,6--3,7), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (3,10--3,11), (3,6--3,11), (3,4--3,11)))], - (3,0--3,13), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,13)); + (3,0--3,13), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,13)); Expr (AnonRecd (false, None, @@ -21,7 +22,8 @@ ImplFile (Ident id, (5,6--5,7), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (5,10--5,11), (5,6--5,11), (5,4--5,11)))], - (5,0--5,14), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,14)); + (5,0--5,14), { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (5,0--5,14)); Expr (AnonRecd (false, None, @@ -30,7 +32,8 @@ ImplFile (Ident id, (7,7--7,8), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (7,11--7,12), (7,7--7,12), (7,5--7,12)))], - (7,0--7,14), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,14)); + (7,0--7,14), { OpeningBraceRange = (7,0--7,2) + WithKeyword = None }), (7,0--7,14)); Expr (AnonRecd (false, None, @@ -39,7 +42,8 @@ ImplFile (Ident id, (9,7--9,8), [LongIdent (SynLongIdent ([int], [], [None]))], [], Some (9,11--9,12), (9,7--9,12), (9,5--9,12)))], - (9,0--9,15), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,15))], + (9,0--9,15), { OpeningBraceRange = (9,0--9,2) + WithKeyword = None }), (9,0--9,15))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl index ede1aa9a366..9bcf0664a75 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl @@ -11,7 +11,8 @@ ImplFile Quote (Ident op_Quotation, false, Const (Int32 3, (3,9--3,10)), false, (3,6--3,13)))], (3,0--3,16), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,16)); + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,16)); Expr (AnonRecd (false, None, @@ -19,7 +20,8 @@ ImplFile 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))], + { OpeningBraceRange = (5,0--5,2) + WithKeyword = None }), (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index 054fad609d3..87028fade33 100644 --- a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -13,8 +13,9 @@ ImplFile [SynExprRecordField ((SynLongIdent ([X], [], [None]), true), Some (4,12--4,13), Some (Const (Int32 12, (5,16--5,18))), (3,8--5,18), None)], - (2,0--5,20)), (2,0--5,20))], PreXmlDocEmpty, [], None, - (2,0--5,20), { LeadingKeyword = None })], (true, true), - { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + (2,0--5,20), { OpeningBraceRange = (2,0--2,1) + WithKeyword = Some (2,6--2,10) }), (2,0--5,20))], + PreXmlDocEmpty, [], None, (2,0--5,20), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl index 4fec61e7b70..828f7d89eb5 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl @@ -49,7 +49,9 @@ ImplFile Some (Const (String ("test", Regular, (9,6--9,12)), (9,6--9,12))), - (9,2--9,12), None)], (3,0--10,1)), (3,0--10,1))], + (9,2--9,12), None)], (3,0--10,1), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--10,1))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--10,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl index 0a376af4ea5..1959261325a 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl @@ -27,7 +27,9 @@ ImplFile SynExprRecordField ((SynLongIdent ([Field3], [], [None]), true), Some (7,11--7,12), Some (Const (Double 3.0, (7,13--7,16))), - (7,4--7,16), None)], (3,0--8,1)), (3,0--8,1))], + (7,4--7,16), None)], (3,0--8,1), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--8,1))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--8,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index 7056c6b65a7..c40d88eac82 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -19,8 +19,10 @@ ImplFile [SynExprRecordField ((SynLongIdent ([X], [], [None]), true), Some (2,28--2,29), Some (Const (Int32 1, (2,30--2,31))), (2,26--2,31), - Some (Semicolon (2,31--2,32)))], (2,0--2,34)), (2,0--2,34))], - PreXmlDocEmpty, [], None, (2,0--2,34), { LeadingKeyword = None })], - (true, true), { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + Some (Semicolon (2,31--2,32)))], (2,0--2,34), + { OpeningBraceRange = (2,0--2,1) + WithKeyword = None }), (2,0--2,34))], PreXmlDocEmpty, [], + None, (2,0--2,34), { LeadingKeyword = None })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl index 409a6349663..61a6ac569c4 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl @@ -9,7 +9,8 @@ ImplFile (false, None, [(SynLongIdent ([F], [], [None]), Some (3,5--3,6), Const (Int32 1, (3,7--3,8)))], (3,0--3,11), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,11))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,11))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl index abb4f9c61af..e9061ea7059 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl @@ -9,7 +9,8 @@ ImplFile (false, None, [(SynLongIdent ([F], [], [None]), Some (3,5--3,6), ArbitraryAfterError ("anonField", (3,3--3,4)))], (3,0--3,9), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,9))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,9))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl index 11a3ed9f18b..9cbb5a3ad83 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 03.fs.bsl @@ -7,7 +7,8 @@ ImplFile [Expr (AnonRecd (false, Some (Ident F, None), [], (3,0--3,7), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,7))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,7))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl index 32f4587f6de..7020d536f4a 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 04.fs.bsl @@ -11,7 +11,8 @@ ImplFile (App (Atomic, false, Ident f, Const (Unit, (3,4--3,6)), (3,3--3,6)), None), [], (3,0--3,9), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,9))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,9))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl index b29469dfd32..08ca8bd3239 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 05.fs.bsl @@ -12,7 +12,8 @@ ImplFile (App (Atomic, false, Ident f, Const (Unit, (3,4--3,6)), (3,3--3,6)), (3,6--3,7), (3,3--3,7)), None), [], - (3,0--3,10), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,10))], + (3,0--3,10), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl index 2c2d232d1e2..506ba4c015e 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 06.fs.bsl @@ -13,7 +13,8 @@ ImplFile (Atomic, false, Ident f, Const (Unit, (3,4--3,6)), (3,3--3,6)), (3,6--3,7), SynLongIdent ([F], [], [None]), (3,3--3,8)), None), [], - (3,0--3,11), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,11))], + (3,0--3,11), { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,11))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl index 0a2441bca98..ff6ec9fb847 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl @@ -11,7 +11,8 @@ ImplFile Const (Int32 1, (3,8--3,9))); (SynLongIdent ([F2], [], [None]), Some (4,6--4,7), ArbitraryAfterError ("anonField", (4,3--4,5)))], (3,0--4,10), - { OpeningBraceRange = (3,0--3,2) }), (3,0--4,10))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--4,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl index 70fdc8e6a09..bfdbeeb5326 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl @@ -11,7 +11,8 @@ ImplFile Const (Int32 1, (3,8--3,9))); (SynLongIdent ([F2], [], [None]), None, ArbitraryAfterError ("anonField", (4,3--4,5)))], (3,0--4,8), - { OpeningBraceRange = (3,0--3,2) }), (3,0--4,8))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--4,8))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl index c40cd96963e..52087cc364e 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl @@ -20,7 +20,8 @@ ImplFile ([op_Equality], [], [Some (OriginalNotation "=")]), None, (5,6--5,7)), Ident F3, (5,3--5,7)), Const (Int32 3, (5,8--5,9)), (5,3--5,9)))], (3,0--5,12), - { OpeningBraceRange = (3,0--3,2) }), (3,0--5,12))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--5,12))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl index cc908ff2853..0c20520bb06 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl @@ -13,7 +13,8 @@ ImplFile ArbitraryAfterError ("anonField", (4,3--4,5))); (SynLongIdent ([F3], [], [None]), Some (5,6--5,7), Const (Int32 3, (5,8--5,9)))], (3,0--5,12), - { OpeningBraceRange = (3,0--3,2) }), (3,0--5,12))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--5,12))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl index 4fe46cfb3d5..c720fb68024 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl @@ -18,7 +18,8 @@ ImplFile ([op_Equality], [], [Some (OriginalNotation "=")]), None, (4,6--4,7)), Ident F2, (4,3--4,7)), Const (Int32 2, (4,8--4,9)), (4,3--4,9)))], (3,0--4,12), - { OpeningBraceRange = (3,0--3,2) }), (3,0--4,12))], + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--4,12))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl index 7a6e68ba867..7a8737f1261 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 12.fs.bsl @@ -7,7 +7,8 @@ ImplFile [Expr (AnonRecd (false, Some (Ident F1, None), [], (3,0--3,5), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,5)); + { OpeningBraceRange = (3,0--3,2) + WithKeyword = None }), (3,0--3,5)); Expr (App (NonAtomic, false, diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl index 253ba19cef9..7df397f864e 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl @@ -10,7 +10,9 @@ ImplFile [SynExprRecordField ((SynLongIdent ([A], [(3,3--3,4)], [None]), true), Some (3,5--3,6), Some (Const (Int32 1, (3,7--3,8))), - (3,2--3,8), None)], (3,0--3,10)), (3,0--3,10))], + (3,2--3,8), None)], (3,0--3,10), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--3,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl index 14d2e09eaf1..066187c025b 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl @@ -11,7 +11,9 @@ ImplFile ((SynLongIdent ([A; B], [(3,3--3,4); (3,5--3,6)], [None; None]), true), Some (3,7--3,8), Some (Const (Int32 1, (3,9--3,10))), - (3,2--3,10), None)], (3,0--3,12)), (3,0--3,12))], + (3,2--3,10), None)], (3,0--3,12), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--3,12))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,12), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl index f1020c78c2c..eb4d8de8f05 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl @@ -10,7 +10,8 @@ ImplFile [SynExprRecordField ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), None)], - (3,0--3,9)), (3,0--3,9))], + (3,0--3,9), { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--3,9))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,9), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl index 112d7a23329..383bdb26382 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl @@ -10,7 +10,9 @@ ImplFile [SynExprRecordField ((SynLongIdent ([A; B], [(3,3--3,4)], [None; None]), true), Some (3,6--3,7), Some (Const (Int32 1, (3,8--3,9))), - (3,2--3,9), None)], (3,0--3,11)), (3,0--3,11))], + (3,2--3,9), None)], (3,0--3,11), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--3,11))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl index aa26d5f1d81..5a36f17f1fb 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl @@ -12,7 +12,9 @@ ImplFile Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), None); SynExprRecordField ((SynLongIdent ([B], [(4,3--4,4)], [None]), true), None, - None, (4,2--4,4), None)], (3,0--4,6)), (3,0--4,6))], + None, (4,2--4,4), None)], (3,0--4,6), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--4,6))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,6), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl index 105c3682a5f..f4571e00288 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl @@ -12,7 +12,9 @@ ImplFile Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), None); SynExprRecordField ((SynLongIdent ([B], [], [None]), true), None, None, - (4,2--4,3), None)], (3,0--4,5)), (3,0--4,5))], + (4,2--4,3), None)], (3,0--4,5), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--4,5))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl index efa568036d4..a897dc2441c 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl @@ -9,7 +9,9 @@ ImplFile (None, None, [SynExprRecordField ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), - None, (3,2--3,5), None)], (3,0--3,7)), (3,0--3,7))], + None, (3,2--3,5), None)], (3,0--3,7), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--3,7))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl index a2360bb38bd..cc8a5da1d20 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl @@ -21,7 +21,8 @@ ImplFile [Some (OriginalNotation "=")]), None, (4,5--4,6)), Ident F2, (4,2--4,6)), Const (Int32 2, (4,7--4,8)), (4,2--4,8))), (3,2--4,8), - None)], (3,0--4,10)), (3,0--4,10))], + None)], (3,0--4,10), { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--4,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl index 42361cf3739..9540e2d5942 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl @@ -12,7 +12,9 @@ ImplFile Some (Const (Int32 1, (3,7--3,8))), (3,2--3,8), None); SynExprRecordField ((SynLongIdent ([F2], [], [None]), true), Some (4,5--4,6), - None, (4,2--4,6), None)], (3,0--4,8)), (3,0--4,8))], + None, (4,2--4,6), None)], (3,0--4,8), + { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--4,8))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl index 4796cc9a9d6..d806d11a092 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl @@ -24,7 +24,8 @@ ImplFile [Some (OriginalNotation "=")]), None, (5,5--5,6)), Ident F3, (5,2--5,6)), Const (Int32 3, (5,7--5,8)), (5,2--5,8))), (4,2--5,8), - None)], (3,0--5,10)), (3,0--5,10))], + None)], (3,0--5,10), { OpeningBraceRange = (3,0--3,1) + WithKeyword = None }), (3,0--5,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl index abb76d98ae6..7e9e50f17e3 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl @@ -9,10 +9,12 @@ ImplFile (true, None, [(SynLongIdent ([Foo], [], [None]), Some (3,11--3,12), Ident someValue)], (2,0--5,16), - { OpeningBraceRange = (3,4--3,6) }), (2,0--5,16)); + { OpeningBraceRange = (3,4--3,6) + WithKeyword = None }), (2,0--5,16)); Expr (AnonRecd - (true, None, [], (7,0--7,12), { OpeningBraceRange = (7,7--7,9) }), + (true, None, [], (7,0--7,12), { OpeningBraceRange = (7,7--7,9) + WithKeyword = None }), (7,0--7,12))], PreXmlDocEmpty, [], None, (2,0--7,12), { LeadingKeyword = None })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl index e7e6666975a..58ce491b279 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl @@ -16,8 +16,9 @@ ImplFile Const (Int32 6, (3,10--3,11))); (SynLongIdent ([Z], [], [None]), Some (4,12--4,13), Const (Int32 7, (4,14--4,15)))], (2,0--4,18), - { OpeningBraceRange = (2,0--2,2) }), (2,0--4,18))], - PreXmlDocEmpty, [], None, (2,0--4,18), { LeadingKeyword = None })], - (true, true), { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + { OpeningBraceRange = (2,0--2,2) + WithKeyword = None }), (2,0--4,18))], PreXmlDocEmpty, [], + None, (2,0--4,18), { LeadingKeyword = None })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index e97685aa2e5..cd80b0fd116 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -24,8 +24,9 @@ ImplFile (NonAtomic, false, Ident someLongFunctionCall, Ident a, (4,16--5,21)), Ident b, (4,16--6,21)), Ident c, (4,16--7,21))), (3,2--7,21), None)], - (2,0--7,23)), (2,0--7,23))], PreXmlDocEmpty, [], None, - (2,0--7,23), { LeadingKeyword = None })], (true, true), - { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [LineComment (3,13--3,28)] }, set [])) + (2,0--7,23), { OpeningBraceRange = (2,0--2,1) + WithKeyword = None }), (2,0--7,23))], + PreXmlDocEmpty, [], None, (2,0--7,23), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [LineComment (3,13--3,28)] }, set [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl index 03e2eefdfd4..c0fe92919ed 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl @@ -59,8 +59,9 @@ ImplFile SynLongIdent ([args; DryRun], [(5,19--5,20)], [None; None]), None, (5,15--5,26)), (2,12--5,26))), (2,2--5,26), - None)], (2,0--5,28)), (2,0--5,28))], PreXmlDocEmpty, [], - None, (2,0--5,28), { LeadingKeyword = None })], (true, true), - { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + None)], (2,0--5,28), { OpeningBraceRange = (2,0--2,1) + WithKeyword = None }), (2,0--5,28))], + PreXmlDocEmpty, [], None, (2,0--5,28), { LeadingKeyword = None })], + (true, true), { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl index fb6de8acc3b..5f6c92ec663 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl @@ -11,7 +11,9 @@ ImplFile [SynExprRecordField ((SynLongIdent ([A], [], [None]), true), Some (3,10--3,11), Some (Const (Int32 1, (3,12--3,13))), - (3,8--3,13), None)], (3,6--3,15)), + (3,8--3,13), None)], (3,6--3,15), + { OpeningBraceRange = (3,6--3,7) + WithKeyword = None }), [SynMatchClause (Record ([NamePatPairField diff --git a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl index eeca2004b89..c99b48ea84d 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl @@ -11,7 +11,9 @@ ImplFile [SynExprRecordField ((SynLongIdent ([A], [], [None]), true), Some (3,10--3,11), Some (Const (Int32 1, (3,12--3,13))), - (3,8--3,13), None)], (3,6--3,15)), + (3,8--3,13), None)], (3,6--3,15), + { OpeningBraceRange = (3,6--3,7) + WithKeyword = None }), [SynMatchClause (Record ([NamePatPairField diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 13.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 13.fs.bsl index 54d1f846530..ef9b67c4fc7 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 13.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 13.fs.bsl @@ -8,7 +8,10 @@ ImplFile (false, [App (NonAtomic, false, Ident async, - Record (None, None, [], (2,6--2,7)), (2,0--2,7)); Ident y], + Record + (None, None, [], (2,6--2,7), + { OpeningBraceRange = (2,6--2,7) + WithKeyword = None }), (2,0--2,7)); Ident y], [(3,15--3,16)], (2,0--3,18)), (2,0--3,18))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,18), { LeadingKeyword = Module (1,0--1,6) })], (true, true), From 53809e79d071e272d6adab034c753a5b3a387e7e Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Thu, 25 Sep 2025 11:09:59 +0300 Subject: [PATCH 16/16] format --- .../Checking/CheckRecordSyntaxHelpers.fs | 22 +++++++++++++++++-- src/Compiler/SyntaxTree/SyntaxTrivia.fs | 6 ++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs index 46e7f6c31a7..ccdd4c19a3a 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs @@ -136,7 +136,16 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid | Some(exprWhenWith, sepOpt) -> Some(exprWhenWith, sepOpt) | None -> None - SynExpr.AnonRecd(isStruct, copyInfoAnon, fields, outerFieldId.idRange, { OpeningBraceRange = range0; WithKeyword = None }) + SynExpr.AnonRecd( + isStruct, + copyInfoAnon, + fields, + outerFieldId.idRange, + { + OpeningBraceRange = range0 + WithKeyword = None + } + ) | _ -> let fields = [ @@ -149,7 +158,16 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid ) ] - SynExpr.Record(None, copyInfo outerFieldId, fields, outerFieldId.idRange, { OpeningBraceRange = outerFieldId.idRange; WithKeyword = None }) + SynExpr.Record( + None, + copyInfo outerFieldId, + fields, + outerFieldId.idRange, + { + OpeningBraceRange = outerFieldId.idRange + WithKeyword = None + } + ) let access, fields = ResolveNestedField cenv.tcSink cenv.nameResolver env.eNameResEnv env.eAccessRights overallTy lid diff --git a/src/Compiler/SyntaxTree/SyntaxTrivia.fs b/src/Compiler/SyntaxTree/SyntaxTrivia.fs index 0a99828963d..a55f3a81918 100644 --- a/src/Compiler/SyntaxTree/SyntaxTrivia.fs +++ b/src/Compiler/SyntaxTree/SyntaxTrivia.fs @@ -138,7 +138,11 @@ type SynExprYieldOrReturnFromTrivia = type SynExprDoBangTrivia = { DoBangKeyword: range } [] -type SynExprRecdTrivia = { OpeningBraceRange: range; WithKeyword: range option } +type SynExprRecdTrivia = + { + OpeningBraceRange: range + WithKeyword: range option + } [] type SynExprSequentialTrivia =