@@ -1108,7 +1108,7 @@ module MutRecBindingChecking =
11081108 let innerState = ( incrCtorInfoOpt, envForTycon, tpenv, recBindIdx, uncheckedBindsRev)
11091109 [ Phase2AInherit ( ty, arg, baseValOpt, m); Phase2AIncrClassCtorJustAfterSuperInit], innerState
11101110
1111- | Some ( SynMemberDefn.LetBindings ( letBinds, isStatic, isRec, m)), _ ->
1111+ | Some ( SynMemberDefn.LetBindings ( bindings = letBinds; isStatic = isStatic ; isRecursive = isRec; range = m)), _ ->
11121112 match tcref.TypeOrMeasureKind, isStatic with
11131113 | TyparKind.Measure, false -> errorR( Error( FSComp.SR.tcMeasureDeclarationsRequireStaticMembers(), m))
11141114 | _ -> ()
@@ -4412,7 +4412,7 @@ module TcDeclarations =
44124412 let attribs = mkAttributeList attribs mWholeAutoProp
44134413 let binding = mkSynBinding ( xmlDoc, headPat) ( None, false , isMutable, mLetPortion, DebugPointAtBinding.NoneAtInvisible, retInfo, synExpr, synExpr.Range, [], attribs, None, SynBindingTrivia.Zero)
44144414
4415- [( SynMemberDefn.LetBindings ([ binding], isStatic, false , mWholeAutoProp))]
4415+ [( SynMemberDefn.LetBindings ([ binding], isStatic, false , mWholeAutoProp, SynMemberDefnLetBindingsTrivia.Zero ))]
44164416
44174417 | SynMemberDefn.Interface ( members= Some membs) -> membs |> List.collect preAutoProps
44184418 | SynMemberDefn.LetBindings _
@@ -5113,7 +5113,7 @@ let ElimSynModuleDeclExpr bind =
51135113 match bind with
51145114 | SynModuleDecl.Expr ( expr, m) ->
51155115 let bind2 = SynBinding ( None, SynBindingKind.StandaloneExpression, false , false , [], PreXmlDoc.Empty, SynInfo.emptySynValData, SynPat.Wild m, None, expr, m, DebugPointAtBinding.NoneAtDo, SynBindingTrivia.Zero)
5116- SynModuleDecl.Let( false , [ bind2], m)
5116+ SynModuleDecl.Let( false , [ bind2], m, SynModuleDeclLetTrivia.Zero )
51175117 | _ -> bind
51185118
51195119let TcMutRecDefnsEscapeCheck ( binds : MutRecShapes < _ , _ , _ >) env =
@@ -5187,12 +5187,12 @@ let TcModuleOrNamespaceElementsMutRec (cenv: cenv) parent typeNames m envInitial
51875187 let decls = typeDefs |> List.map MutRecShape.Tycon
51885188 decls, ( false , false , attrs)
51895189
5190- | SynModuleDecl.Let ( letrec , binds, m) ->
5190+ | SynModuleDecl.Let ( isRecursive = isRecursive ; bindings = binds; range = m) ->
51915191 let binds =
51925192 if isNamespace then
51935193 CheckLetOrDoInNamespace binds m; []
51945194 else
5195- if letrec then [ MutRecShape.Lets binds]
5195+ if isRecursive then [ MutRecShape.Lets binds]
51965196 else List.map ( List.singleton >> MutRecShape.Lets) binds
51975197 binds, ( false , false , attrs)
51985198
@@ -5292,7 +5292,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
52925292 | _ -> [ TMDefOpens openDecls ]
52935293 return ( defns, [], []), env, env
52945294
5295- | SynModuleDecl.Let ( letrec , binds, m) ->
5295+ | SynModuleDecl.Let ( isRecursive = isRecursive ; bindings = binds; range = m) ->
52965296
52975297 match parent with
52985298 | ParentNone ->
@@ -5301,7 +5301,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
53015301
53025302 | Parent parentModule ->
53035303 let containerInfo = ModuleOrNamespaceContainerInfo parentModule
5304- if letrec then
5304+ if isRecursive then
53055305 let scopem = unionRanges m scopem
53065306 let binds = binds |> List.map ( fun bind -> RecDefnBindingInfo( containerInfo, NoNewSlots, ModuleOrMemberBinding, bind))
53075307 let binds , env , _ = TcLetrecBindings WarnOnOverrides cenv env tpenv ( binds, m, scopem)
0 commit comments