From 2a607f169e0a510ea0619eccd153e3e9159a057c Mon Sep 17 00:00:00 2001 From: nojaf Date: Mon, 28 Feb 2022 15:40:58 +0100 Subject: [PATCH] Add trivia for SynExpr.LetOrUseBang. --- src/fsharp/CheckComputationExpressions.fs | 8 ++--- src/fsharp/SyntaxTree.fs | 4 +-- src/fsharp/SyntaxTree.fsi | 4 +-- src/fsharp/SyntaxTrivia.fs | 6 ++++ src/fsharp/SyntaxTrivia.fsi | 11 ++++++- src/fsharp/pars.fsy | 12 +++++--- src/fsharp/service/FSharpParseFileResults.fs | 2 +- ...erService.SurfaceArea.netstandard.expected | 29 ++++++++++++------- tests/service/Symbols.fs | 2 +- 9 files changed, 52 insertions(+), 26 deletions(-) diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index 8d603f7108..5ade9f73b1 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -1137,7 +1137,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter | DebugPointAtSequential.SuppressBoth -> DebugPointAtBinding.NoneAtDo | DebugPointAtSequential.SuppressStmt -> DebugPointAtBinding.Yes m | DebugPointAtSequential.SuppressNeither -> DebugPointAtBinding.Yes m - Some(trans CompExprTranslationPass.Initial q varSpace (SynExpr.LetOrUseBang (sp, false, true, SynPat.Const(SynConst.Unit, rhsExpr.Range), None, rhsExpr, [], innerComp2, m)) translatedCtxt) + Some(trans CompExprTranslationPass.Initial q varSpace (SynExpr.LetOrUseBang (sp, false, true, SynPat.Const(SynConst.Unit, rhsExpr.Range), rhsExpr, [], innerComp2, m, SynExprLetOrUseBangTrivia.Zero)) translatedCtxt) // "expr; cexpr" is treated as sequential execution | _ -> @@ -1555,7 +1555,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Rebind using either for ... or let!.... let rebind = if maintainsVarSpaceUsingBind then - SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtLet, false, false, intoPat, None, dataCompAfterOp, [], contExpr, intoPat.Range) + SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtLet, false, false, intoPat, dataCompAfterOp, [], contExpr, intoPat.Range, SynExprLetOrUseBangTrivia.Zero) else SynExpr.ForEach (DebugPointAtFor.No, DebugPointAtInOrTo.No, SeqExprOnly false, false, intoPat, dataCompAfterOp, contExpr, intoPat.Range) @@ -1577,7 +1577,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Rebind using either for ... or let!.... let rebind = if lastUsesBind then - SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtLet, false, false, varSpacePat, None, dataCompPrior, [], compClausesExpr, compClausesExpr.Range) + SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtLet, false, false, varSpacePat, dataCompPrior, [], compClausesExpr, compClausesExpr.Range, SynExprLetOrUseBangTrivia.Zero) else SynExpr.ForEach (DebugPointAtFor.No, DebugPointAtInOrTo.No, SeqExprOnly false, false, varSpacePat, dataCompPrior, compClausesExpr, compClausesExpr.Range) @@ -1604,7 +1604,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter match TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Zero" builderTy with | minfo :: _ when MethInfoHasAttribute cenv.g m cenv.g.attrib_DefaultValueAttribute minfo -> SynExpr.ImplicitZero m | _ -> SynExpr.YieldOrReturn ((false, true), SynExpr.Const (SynConst.Unit, m), m) - let letBangBind = SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtDo, false, false, SynPat.Const(SynConst.Unit, mUnit), None, rhsExpr, [], bodyExpr, m) + let letBangBind = SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtDo, false, false, SynPat.Const(SynConst.Unit, mUnit), rhsExpr, [], bodyExpr, m, SynExprLetOrUseBangTrivia.Zero) trans CompExprTranslationPass.Initial q varSpace letBangBind translatedCtxt // "expr;" in final position is treated as { expr; zero } diff --git a/src/fsharp/SyntaxTree.fs b/src/fsharp/SyntaxTree.fs index 6037fe2ac8..5f19f5a300 100644 --- a/src/fsharp/SyntaxTree.fs +++ b/src/fsharp/SyntaxTree.fs @@ -784,11 +784,11 @@ type SynExpr = isUse: bool * isFromSource: bool * pat: SynPat * - equalsRange: range option * rhs: SynExpr * andBangs: SynExprAndBang list * body:SynExpr * - range: range + range: range * + trivia: SynExprLetOrUseBangTrivia | MatchBang of matchKeyword: range * diff --git a/src/fsharp/SyntaxTree.fsi b/src/fsharp/SyntaxTree.fsi index d53a26b353..cbd1cd7f79 100644 --- a/src/fsharp/SyntaxTree.fsi +++ b/src/fsharp/SyntaxTree.fsi @@ -972,11 +972,11 @@ type SynExpr = isUse: bool * isFromSource: bool * pat: SynPat * - equalsRange: range option * rhs: SynExpr * andBangs: SynExprAndBang list * body:SynExpr * - range: range + range: range * + trivia: SynExprLetOrUseBangTrivia /// F# syntax: match! expr with pat1 -> expr | ... | patN -> exprN | MatchBang of diff --git a/src/fsharp/SyntaxTrivia.fs b/src/fsharp/SyntaxTrivia.fs index 9044805067..be99b40a66 100644 --- a/src/fsharp/SyntaxTrivia.fs +++ b/src/fsharp/SyntaxTrivia.fs @@ -33,6 +33,12 @@ type SynExprLambdaTrivia = type SynExprLetOrUseTrivia = { InKeyword: range option } +[] +type SynExprLetOrUseBangTrivia = + { EqualsRange: range option } + static member Zero: SynExprLetOrUseBangTrivia = + { EqualsRange = None } + [] type SynMatchClauseTrivia = { ArrowRange: range option diff --git a/src/fsharp/SyntaxTrivia.fsi b/src/fsharp/SyntaxTrivia.fsi index 2345fc06ae..eab574e1bb 100644 --- a/src/fsharp/SyntaxTrivia.fsi +++ b/src/fsharp/SyntaxTrivia.fsi @@ -53,7 +53,7 @@ type SynExprLambdaTrivia = } static member Zero: SynExprLambdaTrivia -/// Represents additional information for SynExpr.Lambda +/// Represents additional information for SynExpr.LetOrUse [] type SynExprLetOrUseTrivia = { @@ -61,6 +61,15 @@ type SynExprLetOrUseTrivia = InKeyword: range option } +/// Represents additional information for SynExpr.LetOrUseBang +[] +type SynExprLetOrUseBangTrivia = + { + /// The syntax range of the `=` token. + EqualsRange: range option + } + static member Zero: SynExprLetOrUseBangTrivia + /// Represents additional information for SynMatchClause [] type SynMatchClauseTrivia = diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 3dc0db1a0d..60853e1b0a 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -3933,7 +3933,8 @@ declExpr: { let spBind = DebugPointAtBinding.Yes(rhs2 parseState 1 5) let mEquals = rhs parseState 3 let m = unionRanges (rhs parseState 1) $8.Range - SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, Some mEquals, $4, $7, $8, m) } + let trivia: SynExprLetOrUseBangTrivia = { EqualsRange = Some mEquals } + SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, $4, $7, $8, m, trivia) } | OBINDER headBindingPattern EQUALS typedSequentialExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP moreBinders typedSequentialExprBlock %prec expr_let { let report, mIn = $5 @@ -3941,7 +3942,8 @@ declExpr: let spBind = DebugPointAtBinding.Yes(unionRanges (rhs parseState 1) $4.Range) let mEquals = rhs parseState 3 let m = unionRanges (rhs parseState 1) $8.Range - SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, Some mEquals, $4, $7, $8, m) } + let trivia: SynExprLetOrUseBangTrivia = { EqualsRange = Some mEquals } + SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, $4, $7, $8, m, trivia) } | OBINDER headBindingPattern EQUALS typedSequentialExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP error %prec expr_let { // error recovery that allows intellisense when writing incomplete computation expressions @@ -3949,11 +3951,13 @@ declExpr: let mEquals = rhs parseState 3 let mAll = unionRanges (rhs parseState 1) (rhs parseState 7) let m = $4.Range.EndRange // zero-width range - SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, Some mEquals, $4, [], SynExpr.ImplicitZero m, mAll) } + let trivia: SynExprLetOrUseBangTrivia = { EqualsRange = Some mEquals } + SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, $4, [], SynExpr.ImplicitZero m, mAll, trivia) } | DO_BANG typedSequentialExpr IN opt_OBLOCKSEP typedSequentialExprBlock %prec expr_let { let spBind = DebugPointAtBinding.NoneAtDo - SynExpr.LetOrUseBang(spBind, false, true, SynPat.Const(SynConst.Unit, $2.Range), None, $2, [], $5, unionRanges (rhs parseState 1) $5.Range) } + let trivia: SynExprLetOrUseBangTrivia = { EqualsRange = None } + SynExpr.LetOrUseBang(spBind, false, true, SynPat.Const(SynConst.Unit, $2.Range), $2, [], $5, unionRanges (rhs parseState 1) $5.Range, trivia) } | ODO_BANG typedSequentialExprBlock hardwhiteDefnBindingsTerminator %prec expr_let { SynExpr.DoBang ($2, unionRanges (rhs parseState 1) $2.Range) } diff --git a/src/fsharp/service/FSharpParseFileResults.fs b/src/fsharp/service/FSharpParseFileResults.fs index f7c07c12bb..9310b4719c 100644 --- a/src/fsharp/service/FSharpParseFileResults.fs +++ b/src/fsharp/service/FSharpParseFileResults.fs @@ -677,7 +677,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! walkExpr false e2 yield! walkExpr false e3 - | SynExpr.LetOrUseBang (spBind, _, _, _, _, e1, es, e2, _) -> + | SynExpr.LetOrUseBang (spBind, _, _, _, e1, es, e2, _, _) -> yield! walkBindSeqPt spBind yield! walkExpr true e1 for SynExprAndBang(debugPoint = andBangSpBind; body = eAndBang) in es do diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected index 5cd92e6f49..6384964188 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected @@ -5169,8 +5169,8 @@ FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtLet() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtSticky() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsYes() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding Combine(FSharp.Compiler.Syntax.DebugPointAtBinding) -FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtDo FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NewYes(FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtDo FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtInvisible FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtLet FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtSticky @@ -5264,28 +5264,28 @@ FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 Tag FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 get_Tag() FSharp.Compiler.Syntax.DebugPointAtLeafExpr: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtSequential -FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressBoth FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressExpr +FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressStmt FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtSequential) FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean Equals(System.Object) FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressBoth FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressExpr +FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressStmt -FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressBoth() FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressExpr() +FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressStmt() -FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressBoth FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressExpr +FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressStmt -FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressBoth() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressExpr() +FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressStmt() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential+Tags FSharp.Compiler.Syntax.DebugPointAtSequential: Int32 CompareTo(FSharp.Compiler.Syntax.DebugPointAtSequential) @@ -6247,12 +6247,12 @@ FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Syntax.SynConst constant FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Syntax.SynConst get_constant() FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr get_innerExpr() -FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr innerExpr FSharp.Compiler.Syntax.SynExpr+DebugPoint: Boolean get_isControlFlow() FSharp.Compiler.Syntax.SynExpr+DebugPoint: Boolean isControlFlow FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.DebugPointAtLeafExpr debugPoint FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.DebugPointAtLeafExpr get_debugPoint() +FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr get_innerExpr() +FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr innerExpr FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Syntax.SynExpr expr FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Syntax.SynExpr get_expr() FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Text.Range get_range() @@ -6457,12 +6457,12 @@ FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr get_ FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr rhs FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynPat get_pat() FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynPat pat +FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia get_trivia() +FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia trivia FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprAndBang] andBangs FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprAndBang] get_andBangs() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] equalsRange -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr] args @@ -6960,7 +6960,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewJoinIn(FSharp. FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLambda(Boolean, Boolean, FSharp.Compiler.Syntax.SynSimplePats, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat],FSharp.Compiler.Syntax.SynExpr]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLambdaTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLazy(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUse(Boolean, Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUseBang(FSharp.Compiler.Syntax.DebugPointAtBinding, Boolean, Boolean, FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprAndBang], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUseBang(FSharp.Compiler.Syntax.DebugPointAtBinding, Boolean, Boolean, FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprAndBang], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyILAssembly(System.Object, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynType], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyStaticOptimization(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynStaticOptimizationConstraint], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyUnionCaseFieldGet(FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident], Int32, FSharp.Compiler.Text.Range) @@ -9128,6 +9128,13 @@ FSharp.Compiler.SyntaxTrivia.SynExprLambdaTrivia: Microsoft.FSharp.Core.FSharpOp FSharp.Compiler.SyntaxTrivia.SynExprLambdaTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_ArrowRange() FSharp.Compiler.SyntaxTrivia.SynExprLambdaTrivia: System.String ToString() FSharp.Compiler.SyntaxTrivia.SynExprLambdaTrivia: Void .ctor(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range]) +FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia +FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia Zero +FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia get_Zero() +FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] EqualsRange +FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_EqualsRange() +FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia: System.String ToString() +FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseBangTrivia: Void .ctor(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range]) FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] InKeyword FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_InKeyword() diff --git a/tests/service/Symbols.fs b/tests/service/Symbols.fs index 2c60a6bf09..20ba3ca461 100644 --- a/tests/service/Symbols.fs +++ b/tests/service/Symbols.fs @@ -702,7 +702,7 @@ comp { SynModuleOrNamespace.SynModuleOrNamespace(decls = [ SynModuleDecl.DoExpr(expr = SynExpr.App(argExpr = SynExpr.ComputationExpr(expr = - SynExpr.LetOrUseBang(equalsRange = Some mLetBangEquals + SynExpr.LetOrUseBang(trivia = { EqualsRange = Some mLetBangEquals } andBangs = [ SynExprAndBang(trivia= { EqualsRange = mAndBangEquals }) ])))) ]) ])) ->