diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index e230cd48280..60b1e0d986c 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. module internal FSharp.Compiler.CheckDeclarations @@ -2048,6 +2048,8 @@ let TcMutRecDefns_Phase2 (cenv: cenv) envInitial mBinds scopem mutRecNSInfo (env // Interfaces exist in the member list - handled above in interfaceMembersFromTypeDefn | SynMemberDefn.Interface _ -> () + | SynMemberDefn.Spread _ -> () + // The following should have been List.unzip out already in SplitTyconDefn | SynMemberDefn.AbstractSlot _ | SynMemberDefn.ValField _ @@ -2613,6 +2615,8 @@ module EstablishTypeDefinitionCores = let m = tycon.Range let env = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars m) env let env = MakeInnerEnvForTyconRef env thisTyconRef false + let ad = env.AccessRights + let spreadSrcTys = ResizeArray () [ match synTyconRepr with | SynTypeDefnSimpleRepr.None _ -> () | SynTypeDefnSimpleRepr.Union (_, unionCases, _) -> @@ -2656,13 +2660,64 @@ module EstablishTypeDefinitionCores = errorR(Error(FSComp.SR.tcStructsMustDeclareTypesOfImplicitCtorArgsExplicitly(), m)) yield (ty, m) - | SynTypeDefnSimpleRepr.Record (_, fields, _) -> - for SynField(fieldType = ty; range = m) in fields do - let tyR, _ = TcTypeAndRecover cenv NoNewTypars NoCheckCxs ItemOccurrence.UseInType WarnOnIWSAM.Yes env tpenv ty - yield (tyR, m) + | SynTypeDefnSimpleRepr.Record (_, fieldsAndSpreads, _) -> + let (|LeftwardExplicit|NoLeftwardExplicit|) hasLeftwardExplicit = if hasLeftwardExplicit then LeftwardExplicit else NoLeftwardExplicit + let LeftwardExplicit = true + let NoLeftwardExplicit = false + + // We must apply the spread shadowing logic here to get + // the correct set of field types. + let rec collectTys tys i fieldsAndSpreads = + match fieldsAndSpreads with + | [] -> + tys + |> Map.toList + |> List.collect (fun (_, (_, dupes)) -> dupes) + |> List.sortBy (fun (i, _, _) -> i) + |> List.map (fun (_, tyR, m) -> tyR, m) + + | SynFieldOrSpread.Field (SynField (idOpt = None)) :: fieldsAndSpreads -> + collectTys tys i fieldsAndSpreads + + | SynFieldOrSpread.Field (SynField (idOpt = Some fieldId; fieldType = ty; range = m)) :: fieldsAndSpreads -> + let tyR, _ = TcTypeAndRecover cenv NoNewTypars NoCheckCxs ItemOccurrence.UseInType WarnOnIWSAM.Yes env tpenv ty + let tys = + tys |> Map.change fieldId.idText (function + | None -> Some (LeftwardExplicit, [i, tyR, m]) + | Some (LeftwardExplicit, dupes) -> Some (LeftwardExplicit, (i, tyR, m) :: dupes) + | Some (NoLeftwardExplicit, _dupes) -> Some (LeftwardExplicit, [i, tyR, m])) + + collectTys tys (i + 1) fieldsAndSpreads + + | SynFieldOrSpread.Spread (SynTypeSpread (ty = ty; range = m)) :: fieldsAndSpreads -> + let spreadSrcTy, _ = TcTypeAndRecover cenv NoNewTypars NoCheckCxs ItemOccurrence.UseInType WarnOnIWSAM.Yes env tpenv ty + + let fieldsFromSpread = + if isRecdTy g spreadSrcTy then + spreadSrcTys.Add spreadSrcTy + ResolveRecordOrClassFieldsOfType cenv.nameResolver m ad spreadSrcTy false + |> List.choose (function + | Item.RecdField field -> Some (field.RecdField.Id.idText, field.FieldType, m) + | _ -> None) + else + match tryDestAnonRecdTy g spreadSrcTy with + | ValueSome (anonInfo, tys) -> tys |> List.mapi (fun i ty -> anonInfo.SortedNames[i], ty, m) + | ValueNone -> [] + + let i, tys = + ((i, tys), fieldsFromSpread) + ||> List.fold (fun (i, tys) (fieldId, ty, m) -> + i + 1, tys |> Map.change fieldId (function + | None -> Some (NoLeftwardExplicit, [i, ty, m]) + | Some (LeftwardExplicit, _dupes) -> Some (LeftwardExplicit, [i, ty, m]) + | Some (NoLeftwardExplicit, _dupes) -> Some (NoLeftwardExplicit, [i, ty, m]))) + + collectTys tys i fieldsAndSpreads + + yield! collectTys Map.empty 0 fieldsAndSpreads | _ -> - () ] + () ], spreadSrcTys let ComputeModuleOrNamespaceKind g isModule typeNames attribs nm = if not isModule then (Namespace true) @@ -3585,14 +3640,219 @@ module EstablishTypeDefinitionCores = let repr = Construct.MakeUnionRepr unionCases repr, None, NoSafeInitInfo - | SynTypeDefnSimpleRepr.Record (_, fields, mRepr) -> + | SynTypeDefnSimpleRepr.Record (_accessibility, fieldsAndSpreads, mRepr) -> noMeasureAttributeCheck() noSealedAttributeCheck FSComp.SR.tcTypesAreAlwaysSealedRecord noAbstractClassAttributeCheck() noAllowNullLiteralAttributeCheck() structLayoutAttributeCheck true // these are allowed for records - let recdFields = TcRecdUnionAndEnumDeclarations.TcNamedFieldDecls cenv envinner innerParent false tpenv fields - recdFields |> CheckDuplicates (fun f -> f.Id) "field" |> ignore + + let recdFields, _tpenv = + let rec tcFieldsAndSpreads fields i tpenv fieldsAndSpreads = + let (|LeftwardExplicit|NoLeftwardExplicit|) hasLeftwardExplicit = if hasLeftwardExplicit then LeftwardExplicit else NoLeftwardExplicit + let LeftwardExplicit = true + let NoLeftwardExplicit = false + + match fieldsAndSpreads with + | [] -> + let fields = + fields + |> Map.toList + |> List.collect (fun (_, (_, dupes)) -> dupes) + |> List.sortBy (fun (i, _) -> i) + |> List.map (fun (_, field) -> field) + + fields, tpenv + + | SynFieldOrSpread.Field synField :: fieldsAndSpreads -> + match TcRecdUnionAndEnumDeclarations.TcNamedFieldDecl cenv envinner innerParent false tpenv synField with + | Some recdField -> + let fields = + fields |> Map.change recdField.Id.idText (function + // The first field of this name, explicit or spread. + | None -> + Some (LeftwardExplicit, [i, recdField]) + + // Rightward explicit duplicate of leftward explicit field, potentially with intervening spreads. + // + // type R1 = { A : int; A : string } + // + // or + // + // type R1 = { A : float } + // type R2 = { A : int; ...R1; A : string } + // + // Keep both, but error. + | Some (LeftwardExplicit, dupes) -> + errorR (Duplicate ("field", recdField.Id.idText, recdField.Id.idRange)) + Some (LeftwardExplicit, (i, recdField) :: dupes) + + // Rightward explicit field shadowing leftward spread field. + // + // type R1 = { A : int } + // type R2 = { ...R1; A : string } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (LeftwardExplicit, [i, recdField])) + + tcFieldsAndSpreads fields (i + 1) tpenv fieldsAndSpreads + + | None -> tcFieldsAndSpreads fields i tpenv fieldsAndSpreads + + | SynFieldOrSpread.Spread (SynTypeSpread (ty = ty; range = m)) :: fieldsAndSpreads -> + checkLanguageFeatureAndRecover g.langVersion LanguageFeature.RecordSpreads m + + let (spreadSrcTy, tpenv), error = + try TcType cenv NoNewTypars CheckCxs ItemOccurrence.UseInType WarnOnIWSAM.Yes envinner tpenv ty, false with + | RecoverableException e -> + errorRecovery e ty.Range + (g.obj_ty_ambivalent, tpenv), true + + if error || isRecdTy g spreadSrcTy || isAnonRecdTy g spreadSrcTy then + // It seems very likely that there's a better/existing way of doing this. + let spreadSrcTy = + tryAppTy g spreadSrcTy + |> ValueOption.map (fun (tcref, tinst) -> + let tinst = + tinst + |> List.map (fun ty -> + tryDestTyparTy g ty + |> ValueOption.map (fun typar -> + let typars, _, _ = FreshenAndFixupTypars g m TyparRigidity.Flexible [] [] [typar] + mkTyparTy (List.head typars)) + |> ValueOption.orElseWith (fun () -> + let tryDestMeasureTy g ty = + match stripTyEqns g ty with + | TType_measure m -> ValueSome m + | _ -> ValueNone + + tryDestMeasureTy g ty + |> ValueOption.bind (function Measure.Var typar -> ValueSome typar | _ -> ValueNone) + |> ValueOption.map (fun typar -> + let typars, _, _ = FreshenAndFixupTypars g m TyparRigidity.Flexible [] [] [typar] + TType_measure (Measure.Var (List.head typars)))) + |> ValueOption.defaultValue ty) + + TType_app (tcref, tinst, g.knownWithoutNull)) + |> ValueOption.defaultValue spreadSrcTy + + let rec tcFieldsOfSpreadTy fields i fieldsOfTy = + match fieldsOfTy with + | [] -> tcFieldsAndSpreads fields i tpenv fieldsAndSpreads + + | Item.RecdField fieldInfo :: fieldsOfTy -> + // Update the field ID's range to be that of the spread. + let syntheticId = ident (fieldInfo.RecdField.Id.idText, m) + let fieldTy = fieldInfo.FieldType + let recdField = + { fieldInfo.RecdField with + rfield_id = syntheticId + rfield_type = fieldTy } + + let fields = + fields |> Map.change recdField.Id.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, recdField]) + + // Rightward spread field shadowing leftward explicit field. + // + // type R1 = { A : int } + // type R2 = { A : string; ...R1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let fmtedSpreadField = NicePrint.stringOfRecdField envinner.DisplayEnv cenv.infoReader fieldInfo.TyconRef recdField + let fmtedSpreadSrcTy = NicePrint.stringOfTy envinner.DisplayEnv spreadSrcTy + warning (Error (FSComp.SR.tcRecordTypeDefinitionSpreadFieldShadowsExplicitField (fmtedSpreadField, fmtedSpreadSrcTy), m)) + Some (LeftwardExplicit, [i, recdField]) + + // Spread field shadowing spread field. + // + // type R1 = { A : int } + // type R2 = { A : string } + // type R3 = { ...R1; ...R2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, recdField])) + + tcFieldsOfSpreadTy fields (i + 1) fieldsOfTy + + | Item.AnonRecdField (anonInfo, tys, fieldIndex, _) :: fieldsOfTy -> + let fieldId = + let orig = anonInfo.SortedIds[fieldIndex] + ident (orig.idText, m) + + let ty = tys[fieldIndex] + + let recdField = + let stat = false + let konst = None + let generated = false + let mut = false + let volatile = false + let pattribs = [] + let fattribs = [] + let vis = None + TcRecdUnionAndEnumDeclarations.MakeRecdFieldSpec g envinner innerParent (stat, konst, ty, pattribs, fattribs, fieldId, generated, mut, volatile, XmlDoc.Empty, vis, m) + + let fields = + fields |> Map.change fieldId.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, recdField]) + + // Rightward spread field shadowing leftward explicit field. + // + // type R1 = { A : int } + // type R2 = { A : string; ...R1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let typars = tryAppTy g ty |> ValueOption.map (snd >> List.choose (tryDestTyparTy g >> ValueOption.toOption)) |> ValueOption.defaultValue [] + let fmtedSpreadField = LayoutRender.showL (NicePrint.prettyLayoutOfMemberSig envinner.DisplayEnv ([], fieldId.idText, typars, [], ty)) + let fmtedSpreadSrcTy = NicePrint.stringOfTy envinner.DisplayEnv spreadSrcTy + warning (Error (FSComp.SR.tcRecordTypeDefinitionSpreadFieldShadowsExplicitField (fmtedSpreadField, fmtedSpreadSrcTy), m)) + Some (LeftwardExplicit, [i, recdField]) + + // Spread field shadowing spread field. + // + // type R1 = { A : int } + // type R2 = { A : string } + // type R3 = { ...R1; ...R2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, recdField])) + + tcFieldsOfSpreadTy fields (i + 1) fieldsOfTy + + | _ :: fieldsOfTy -> tcFieldsOfSpreadTy fields i fieldsOfTy + + let recordFieldsFromSpread = + if isRecdTy g spreadSrcTy then + ResolveRecordOrClassFieldsOfType cenv.nameResolver m ad spreadSrcTy false + |> List.map (function + | Item.RecdField field -> Item.RecdField (FreshenRecdFieldRef cenv.nameResolver m field.RecdFieldRef) + | item -> item) + else + tryDestAnonRecdTy g spreadSrcTy + |> ValueOption.map (fun (anonInfo, tys) -> + anonInfo.SortedIds + |> List.ofArray + |> List.mapi (fun i id -> Item.AnonRecdField (anonInfo, tys, i, id.idRange))) + |> ValueOption.defaultValue [] + + tcFieldsOfSpreadTy fields i recordFieldsFromSpread + else + if not ty.IsFromParseError then + errorR (Error (FSComp.SR.tcRecordTypeDefinitionSpreadSourceMustBeRecord (), m)) + tcFieldsAndSpreads fields i tpenv fieldsAndSpreads + + tcFieldsAndSpreads Map.empty 0 tpenv fieldsAndSpreads + writeFakeRecordFieldsToSink recdFields CallEnvSink cenv.tcSink (mRepr, envinner.NameEnv, ad) @@ -4112,14 +4372,43 @@ module EstablishTypeDefinitionCores = // be satisfied, so we have to do this prior to checking any constraints. // // First find all the field types in all the structural types - let tyconsWithStructuralTypes = - (envMutRecPrelim, withEnvs) - ||> MutRecShapes.mapTyconsWithEnv (fun envForDecls (origInfo, tyconOpt) -> - match origInfo, tyconOpt with - | (typeDefCore, _, _), Some tycon -> Some (tycon, GetStructuralElementsOfTyconDefn cenv envForDecls tpenv typeDefCore tycon) - | _ -> None) - |> MutRecShapes.collectTycons - |> List.choose id + let tyconsWithStructuralTypes = + let all = + (envMutRecPrelim, withEnvs) + ||> MutRecShapes.mapTyconsWithEnv (fun envForDecls (origInfo, tyconOpt) -> + match origInfo, tyconOpt with + | (typeDefCore, _, _), Some tycon -> Some (tycon, GetStructuralElementsOfTyconDefn cenv envForDecls tpenv typeDefCore tycon) + | _ -> None) + |> MutRecShapes.collectTycons + |> List.choose id + + // Check for cyclic spreads. + do + if cenv.g.langVersion.SupportsFeature LanguageFeature.RecordSpreads then + let (|PotentiallyRecursiveTycon|_|) ty = + tryTcrefOfAppTy cenv.g ty + |> ValueOption.bind _.TryDeref + + let edges = + [ + for dst, (_, spreadSrcs) in all do + for src in spreadSrcs do + match src with + | PotentiallyRecursiveTycon src -> dst, src + | _ -> () + ] + + let tycons = + [ + for dst, src in edges do + yield dst + yield src + ] + + let graph = Graph (_.Stamp, tycons, edges) + graph.IterateCycles (fun path -> errorR (Error (FSComp.SR.tcTypeDefinitionIsCyclicThroughSpreads (), (List.head path).Range))) + + [for tycon, (tys, _) in all -> tycon, tys] let scSet = TyconConstraintInference.InferSetOfTyconsSupportingComparable cenv envMutRecPrelim.DisplayEnv tyconsWithStructuralTypes let seSet = TyconConstraintInference.InferSetOfTyconsSupportingEquatable cenv envMutRecPrelim.DisplayEnv tyconsWithStructuralTypes @@ -4391,7 +4680,8 @@ module TcDeclarations = // covered above | SynMemberDefn.ValField _ | SynMemberDefn.Inherit _ - | SynMemberDefn.AbstractSlot _ -> false) + | SynMemberDefn.AbstractSlot _ + | SynMemberDefn.Spread _ -> false) // Convert auto properties to let bindings in the pre-list let rec preAutoProps memb = diff --git a/src/Compiler/Checking/CheckPatterns.fs b/src/Compiler/Checking/CheckPatterns.fs index c9d75c11244..9fa0914a3c1 100644 --- a/src/Compiler/Checking/CheckPatterns.fs +++ b/src/Compiler/Checking/CheckPatterns.fs @@ -496,13 +496,22 @@ and TcPatArrayOrList warnOnUpper cenv env vFlags patEnv ty isArray args m = phase2, acc and TcRecordPat warnOnUpper (cenv: cenv) env vFlags patEnv ty fieldPats m = - let fieldPats = + let idents = + fieldPats + |> List.map (fun fieldPat -> + let (|Last|) = List.last + match fieldPat with + | NamePatPairField (fieldName = SynLongIdent (id = [fieldId])) + | NamePatPairField (fieldName = SynLongIdent (id = Last fieldId)) -> fieldId) + + let fieldPats = fieldPats |> List.map (fun (NamePatPairField(fieldName = fieldLid; pat = pat)) -> match fieldLid.LongIdent with - | [id] -> ([], id), pat - | lid -> List.frontAndBack lid, pat) + | [id] -> ExplicitOrSpread.Explicit (([], id), pat) + | lid -> ExplicitOrSpread.Explicit (List.frontAndBack lid, pat)) + CheckRecdExprDuplicateFields idents match BuildFieldMap cenv env false ty fieldPats m with | None -> (fun _ -> TPat_error m), patEnv | Some(tinst, tcref, fldsmap, _fldsList) -> @@ -518,13 +527,14 @@ and TcRecordPat warnOnUpper (cenv: cenv) env vFlags patEnv ty fieldPats m = let fieldPats, patEnvR = (patEnv, ftys) ||> List.mapFold (fun s (ty, fsp) -> match fldsmap.TryGetValue fsp.rfield_id.idText with - | true, v -> + | true, ExplicitOrSpread.Explicit v -> let warnOnUpper = if cenv.g.langVersion.SupportsFeature(LanguageFeature.DontWarnOnUppercaseIdentifiersInBindingPatterns) then AllIdsOK else warnOnUpper TcPat warnOnUpper cenv env None vFlags s ty v + | true, ExplicitOrSpread.Spread _ -> (* Unreachable. *) error (InternalError ("Spreads in patterns are not supported.", m)) | _ -> (fun _ -> TPat_wild m), s) let phase2 values = diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs index aa2e3546ba0..02f167df00e 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs @@ -28,27 +28,29 @@ open FSharp.Compiler.SyntaxTrivia /// which we here convert to /// /// { x with A = { x.A with B = 10; C = "" } } -let GroupUpdatesToNestedFields (fields: ((Ident list * Ident) * SynExpr option) list) = +let GroupUpdatesToNestedFields (fields: (ExplicitOrSpread<(Ident list * Ident) * SynExpr option, (Ident list * Ident) * 'Spread>) list) = let rec groupIfNested res xs = match xs with | [] -> res | [ x ] -> x :: res | x :: y :: ys -> match x, y with - | (lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1, m))), (_, Some(SynExpr.Record(recordFields = fields2))) -> + | ExplicitOrSpread.Explicit(lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1, m))), + ExplicitOrSpread.Explicit(_, Some(SynExpr.Record(recordFields = fields2))) -> let reducedRecd = - (lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1 @ fields2, m))) + ExplicitOrSpread.Explicit(lidwid, Some(SynExpr.Record(baseInfo, copyInfo, fields1 @ fields2, m))) groupIfNested res (reducedRecd :: ys) - | (lidwid, Some(SynExpr.AnonRecd(isStruct, copyInfo, fields1, m, trivia))), (_, Some(SynExpr.AnonRecd(recordFields = fields2))) -> + | ExplicitOrSpread.Explicit(lidwid, Some(SynExpr.AnonRecd(isStruct, copyInfo, fields1, m, trivia))), + ExplicitOrSpread.Explicit(_, Some(SynExpr.AnonRecd(recordFields = fields2))) -> let reducedRecd = - (lidwid, Some(SynExpr.AnonRecd(isStruct, copyInfo, fields1 @ fields2, m, trivia))) + ExplicitOrSpread.Explicit(lidwid, Some(SynExpr.AnonRecd(isStruct, copyInfo, fields1 @ fields2, m, trivia))) groupIfNested res (reducedRecd :: ys) | _ -> groupIfNested (x :: res) (y :: ys) fields - |> List.groupBy (fun ((_, field), _) -> field.idText) + |> List.groupBy (fun (ExplicitOrSpread.Explicit((_, field), _) | ExplicitOrSpread.Spread((_, field), _)) -> field.idText) |> List.collect (fun (_, fields) -> if fields.Length < 2 then fields @@ -122,18 +124,28 @@ let TransformAstForNestedUpdates (cenv: TcFileState) (env: TcEnv) overallTy (lid | Item.AnonRecdField( anonInfo = { AnonRecdTypeInfo.TupInfo = TupInfo.Const isStruct - }) -> - let fields = [ LongIdentWithDots([ fieldId ], []), None, nestedField ] + } + range = m) -> + let fields = + [ + SynExprAnonRecordFieldOrSpread.Field( + SynExprAnonRecordField(LongIdentWithDots([ fieldId ], []), None, nestedField, m), + None + ) + ] + SynExpr.AnonRecd(isStruct, copyInfo outerFieldId, fields, outerFieldId.idRange, { OpeningBraceRange = range0 }) | _ -> let fields = [ - SynExprRecordField( - (LongIdentWithDots([ fieldId ], []), true), - None, - Some nestedField, - unionRanges fieldId.idRange nestedField.Range, - None + SynExprRecordFieldOrSpread.Field( + SynExprRecordField( + (LongIdentWithDots([ fieldId ], []), true), + None, + Some nestedField, + unionRanges fieldId.idRange nestedField.Range, + None + ) ) ] diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi index dc68f8a73e2..31f2e5a210e 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fsi @@ -3,12 +3,14 @@ module internal FSharp.Compiler.CheckRecordSyntaxHelpers open FSharp.Compiler.CheckBasics +open FSharp.Compiler.NameResolution open FSharp.Compiler.Syntax open FSharp.Compiler.Text open FSharp.Compiler.TypedTree val GroupUpdatesToNestedFields: - fields: ((Ident list * Ident) * SynExpr option) list -> ((Ident list * Ident) * SynExpr option) list + fields: (ExplicitOrSpread<(Ident list * Ident) * SynExpr option, (Ident list * Ident) * 'Spread>) list -> + (ExplicitOrSpread<(Ident list * Ident) * SynExpr option, (Ident list * Ident) * 'Spread>) list val TransformAstForNestedUpdates<'a> : cenv: TcFileState -> diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 527a09cf1d0..489d46da337 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -1913,24 +1913,23 @@ let CheckRecdExprDuplicateFields (elems: Ident list) = //------------------------------------------------------------------------- /// Helper used to check record expressions and record patterns -let BuildFieldMap (cenv: cenv) env isPartial ty (flds: ((Ident list * Ident) * 'T) list) m = +let BuildFieldMap (cenv: cenv) env isPartial ty (flds: ExplicitOrSpread<(Ident list * Ident) * 'Explicit, (Ident list * Ident) * 'Spread> list) m = let g = cenv.g let ad = env.eAccessRights - let allFields = flds |> List.map (fun ((_, ident), _) -> ident) - if allFields.Length > 1 then - // In the case of nested record fields on the same level in record copy-and-update. - // We need to reverse the list to get the correct order of fields. - let idents = if isPartial then allFields |> List.rev else allFields - CheckRecdExprDuplicateFields idents + let allFields = flds |> List.map (fun (ExplicitOrSpread.Explicit ((_, ident), _) | ExplicitOrSpread.Spread ((_, ident), _)) -> ident) let fldResolutions = flds - |> List.choose (fun (fld, fldExpr) -> + |> List.choose (fun fld -> try - let fldPath, fldId = fld - let frefSet = ResolveField cenv.tcSink cenv.nameResolver env.eNameResEnv ad ty fldPath fldId allFields - Some(fld, frefSet, fldExpr) + let fld, fldExpr, fldInfo = + match fld with + | ExplicitOrSpread.Explicit ((fldPath, fldId) as fld, fldExpr) -> fld, ExplicitOrSpread.Explicit fldExpr, ExplicitOrSpread.Explicit (ty, fldPath, fldId) + | ExplicitOrSpread.Spread ((fldPath, fldId) as fld, fldExpr) -> fld, ExplicitOrSpread.Spread fldExpr, ExplicitOrSpread.Spread (ty, fldPath, fldId) + + ResolveField cenv.tcSink cenv.nameResolver env.eNameResEnv ad fldInfo allFields + |> Option.map (fun frefSet -> fld, frefSet, fldExpr) with e -> errorRecoveryNoRange e None @@ -6869,7 +6868,7 @@ and TcCtorCall isNaked cenv env tpenv (overallTy: OverallTy) objTy mObjTyOpt ite error(Error(FSComp.SR.tcSyntaxCanOnlyBeUsedToCreateObjectTypes(if superInit then "inherit" else "new"), mWholeCall)) // Check a record construction expression -and TcRecordConstruction (cenv: cenv) (overallTy: TType) isObjExpr env tpenv withExprInfoOpt objTy fldsList m = +and TcRecordConstruction (cenv: cenv) (overallTy: TType) isObjExpr env tpenv withExprInfoOpt (spreadSrcs : (Expr -> Expr) list) objTy fldsList m = let g = cenv.g let tcref, tinst = destAppTy g objTy @@ -6882,24 +6881,42 @@ and TcRecordConstruction (cenv: cenv) (overallTy: TType) isObjExpr env tpenv wit errorR(Error(FSComp.SR.tcConstructorRequiresCall(tycon.DisplayName), m)) let fspecs = tycon.TrueInstanceFieldsAsList - // Freshen types and work out their subtype flexibility - let fldsList = - [ for fname, fexpr in fldsList do - let fspec = - try - fspecs |> List.find (fun fspec -> fspec.LogicalName = fname) - with :? KeyNotFoundException -> - error (Error(FSComp.SR.tcUndefinedField(fname, NicePrint.minimalStringOfType env.DisplayEnv objTy), m)) - let fty = actualTyOfRecdFieldForTycon tycon tinst fspec - let flex = not (isTyparTy g fty) - yield (fname, fexpr, fty, flex) ] + // Freshen types and work out their subtype flexibility // Type check and generalize the supplied bindings let fldsList, tpenv = let env = { env with eContextInfo = ContextInfo.RecordFields } - (tpenv, fldsList) ||> List.mapFold (fun tpenv (fname, fexpr, fty, flex) -> - let fieldExpr, tpenv = TcExprFlex cenv flex false fty env tpenv fexpr - (fname, fieldExpr), tpenv) + let rec tcFields checkedFields tpenv fields = + match fields with + | [] -> List.rev checkedFields, tpenv + | (fname, ExplicitOrSpread.Explicit fexpr) :: fields -> + let checkedFields, tpenv = + fspecs + |> List.tryFind (fun fspec -> fspec.LogicalName = fname) + |> Option.map (fun fspec -> + let fty = actualTyOfRecdFieldForTycon tycon tinst fspec + let flex = not (isTyparTy g fty) + let fieldExpr, tpenv = TcExprFlex cenv flex false fty env tpenv fexpr + (fname, fieldExpr) :: checkedFields, tpenv) + |> Option.defaultWith (fun () -> + error (Error(FSComp.SR.tcUndefinedField(fname, NicePrint.minimalStringOfType env.DisplayEnv objTy), m))) + + tcFields checkedFields tpenv fields + + | (fname, ExplicitOrSpread.Spread (ty, spreadValue)) :: fields -> + let checkedFields = + fspecs + |> List.tryPick (fun fspec -> + if fspec.LogicalName = fname then + let fty = actualTyOfRecdFieldForTycon tycon tinst fspec + if AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css m fty ty then Some ((fname, spreadValue) :: checkedFields) + else None // We ignore non-matching fields from spreads. + else None) + |> Option.defaultValue checkedFields // We ignore extra fields from spreads. + + tcFields checkedFields tpenv fields + + tcFields [] tpenv fldsList // Add rebindings for unbound field when an "old value" is available // Effect order: mutable fields may get modified by other bindings... @@ -6959,16 +6976,20 @@ and TcRecordConstruction (cenv: cenv) (overallTy: TType) isObjExpr env tpenv wit let expr = mkRecordExpr g (GetRecdInfo env, tcref, tinst, rfrefs, args, m) let expr = - match withExprInfoOpt with - | None -> - // '{ recd fields }'. // - expr + let locals = + [ + match withExprInfoOpt with + | None -> id + | Some (withExpr, withExprAddrVal, _) -> + // '{ recd with fields }'. + // Assign the first object to a tmp and then construct + let wrap, oldaddr, _readonly, _writeonly = mkExprAddrOfExpr g tycon.IsStructOrEnumTycon false NeverMutates withExpr None m + fun expr -> wrap (mkCompGenLet m withExprAddrVal oldaddr expr) - | Some (withExpr, withExprAddrVal, _) -> - // '{ recd with fields }'. - // Assign the first object to a tmp and then construct - let wrap, oldaddr, _readonly, _writeonly = mkExprAddrOfExpr g tycon.IsStructOrEnumTycon false NeverMutates withExpr None m - wrap (mkCompGenLet m withExprAddrVal oldaddr expr) + yield! spreadSrcs + ] + + (locals, expr) ||> List.foldBack (fun local expr -> local expr) expr, tpenv @@ -7251,10 +7272,11 @@ and TcObjectExpr (cenv: cenv) env tpenv (objTy, realObjTy, argopt, binds, extraI let fldsList = binds |> List.map (fun b -> match BindingNormalization.NormalizeBinding ObjExprBinding cenv env b with - | NormalizedBinding (_, _, _, _, [], _, _, _, SynPat.Named(SynIdent(id,_), _, _, _), NormalizedBindingRhs(_, _, rhsExpr), _, _) -> id.idText, rhsExpr + | NormalizedBinding (_, _, _, _, [], _, _, _, SynPat.Named(SynIdent(id,_), _, _, _), NormalizedBindingRhs(_, _, rhsExpr), _, _) -> id.idText, ExplicitOrSpread.Explicit rhsExpr | _ -> error(Error(FSComp.SR.tcOnlySimpleBindingsCanBeUsedInConstructionExpressions(), b.RangeOfBindingWithoutRhs))) - TcRecordConstruction cenv objTy true env tpenv None objTy fldsList mWholeExpr + let spreadSrcs = [] + TcRecordConstruction cenv objTy true env tpenv None spreadSrcs objTy fldsList mWholeExpr else // object expression construction e.g. { new A() with ... } or { new IA with ... } let ctorCall, baseIdOpt, tpenv = @@ -7738,6 +7760,7 @@ and TcAssertExpr cenv overallTy env (m: range) tpenv x = and TcRecdExpr cenv overallTy env tpenv (inherits, withExprOpt, synRecdFields, mWholeExpr) = let g = cenv.g + let ad = env.eAccessRights let requiresCtor = (GetCtorShapeCounter env = 1) // Get special expression forms for constructors let haveCtor = Option.isSome inherits @@ -7754,26 +7777,185 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, withExprOpt, synRecdFields, m let hasOrigExpr = withExprOptChecked.IsSome - let fldsList = - let flds = - synRecdFields - |> List.map (fun (SynExprRecordField (fieldName = (synLongId, isOk); expr = exprBeingAssigned)) -> - // if we met at least one field that is not syntactically correct - raise ReportedError to transfer control to the recovery routine - if not isOk then - // raising ReportedError None transfers control to the closest errorRecovery point but do not make any records into log - // we assume that parse errors were already reported - raise (ReportedError None) - - match withExprOpt, synLongId.LongIdent, exprBeingAssigned with - | _, [ id ], _ -> ([], id), exprBeingAssigned - | Some withExpr, lid, Some exprBeingAssigned -> TransformAstForNestedUpdates cenv env overallTy lid exprBeingAssigned withExpr - | _ -> List.frontAndBack synLongId.LongIdent, exprBeingAssigned) + let spreadSrcs, fldsList, tpenv = + let spreadSrcs, flds, tpenv = + let rec loopFieldsAndSpreads spreadSrcs flds i tpenv fieldsAndSpreads = + let (|LeftwardExplicit|NoLeftwardExplicit|) hasLeftwardExplicit = if hasLeftwardExplicit then LeftwardExplicit else NoLeftwardExplicit + let LeftwardExplicit = true + let NoLeftwardExplicit = false + + match fieldsAndSpreads with + | [] -> + let flds = + flds + |> Map.toList + |> List.collect (fun (_, (_, dupes)) -> dupes) + |> List.sortBy (fun (i, _) -> i) + |> List.map (fun (_, field) -> field) + + List.rev spreadSrcs, flds, tpenv + + | SynExprRecordFieldOrSpread.Field (SynExprRecordField (fieldName = (synLongId, isOk); expr = exprBeingAssigned; range = m)) :: fieldsAndSpreads -> + // if we met at least one field that is not syntactically correct - raise ReportedError to transfer control to the recovery routine + if not isOk then + // raising ReportedError None transfers control to the closest errorRecovery point but do not make any records into log + // we assume that parse errors were already reported + raise (ReportedError None) + + let isFromNestedUpdate, fieldId, field = + match withExprOpt, synLongId.LongIdent, exprBeingAssigned with + | _, [ id ], _ -> false, id, ExplicitOrSpread.Explicit (([], id), exprBeingAssigned) + | Some withExpr, lid, Some exprBeingAssigned -> + let _, id as longIdent, exprBeingAssigned = TransformAstForNestedUpdates cenv env overallTy lid exprBeingAssigned withExpr + true, id, ExplicitOrSpread.Explicit (longIdent, exprBeingAssigned) + | _ -> + let _, id as longIdent = List.frontAndBack synLongId.LongIdent + false, id, ExplicitOrSpread.Explicit (longIdent, exprBeingAssigned) + + let flds = + flds |> Map.change fieldId.idText (function + // The first field of this name, explicit or spread. + | None -> + Some (LeftwardExplicit, [i, field]) + + // Rightward explicit duplicate of leftward explicit field, potentially with intervening spreads. + // + // let r1 = { A = 3; A = "3" } + // + // or + // + // let r1 = { A = 3.14 } + // let r2 = { A = 3; ...r1; A = "3" } + // + // Keep both, but error. + | Some (LeftwardExplicit, dupes) -> + if not isFromNestedUpdate then + errorR (Error (FSComp.SR.tcMultipleFieldsInRecord fieldId.idText, m)) + Some (LeftwardExplicit, (i, field) :: dupes) + + // Rightward explicit field shadowing leftward spread field. + // + // let r1 = { A = 3 } + // let r2 = { ...r1; A = "3" } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (LeftwardExplicit, [i, field])) + + loopFieldsAndSpreads spreadSrcs flds (i + 1) tpenv fieldsAndSpreads + + | SynExprRecordFieldOrSpread.Spread (SynExprSpread (expr = expr; range = m), _) :: fieldsAndSpreads -> + checkLanguageFeatureAndRecover g.langVersion LanguageFeature.RecordSpreads m + + let flex = false + let spreadSrcExpr, tpenv = TcExprFlex cenv flex false (NewInferenceType g) env tpenv expr + let tyOfSpreadSrcExpr = tyOfExpr g spreadSrcExpr + + if isRecdTy g tyOfSpreadSrcExpr || isAnonRecdTy g tyOfSpreadSrcExpr then + let spreadSrcAddrExpr, spreadSrcs = + let spreadSrcAddrVal, spreadSrcAddrExpr = mkCompGenLocal mWholeExpr "spreadSrc" (if isStructTy g overallTy then mkByrefTy g overallTy else overallTy) + let wrap, oldAddr, _readonly, _writeonly = mkExprAddrOfExpr g (isStructTy g tyOfSpreadSrcExpr) false NeverMutates spreadSrcExpr None m + spreadSrcAddrExpr, (fun expr -> wrap (mkCompGenLet m spreadSrcAddrVal oldAddr expr)) :: spreadSrcs + + let rec loopFieldsFromSpread flds i fieldsFromSpread = + match fieldsFromSpread with + | [] -> loopFieldsAndSpreads spreadSrcs flds i tpenv fieldsAndSpreads + + | Item.RecdField fieldInfo :: fieldsFromSpread -> + let fieldExpr = mkRecdFieldGetViaExprAddr (spreadSrcAddrExpr, fieldInfo.RecdFieldRef, fieldInfo.TypeInst, m) + let fieldId = ident (fieldInfo.RecdField.Id.idText, m) + let ty = fieldInfo.FieldType + + let flds = + flds |> Map.change fieldId.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Rightward spread field shadowing leftward explicit field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3"; ...r1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let fmtedSpreadField = NicePrint.stringOfRecdField env.DisplayEnv cenv.infoReader fieldInfo.TyconRef fieldInfo.RecdField + warning (Error (FSComp.SR.tcRecordExprSpreadFieldShadowsExplicitField fmtedSpreadField, m)) + Some (LeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Spread field shadowing spread field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3" } + // let r3 = { ...r1; ...r2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))])) + + loopFieldsFromSpread flds (i + 1) fieldsFromSpread + + | Item.AnonRecdField (anonInfo, tys, fieldIndex, _) :: fieldsFromSpread -> + let fieldExpr = mkAnonRecdFieldGet g (anonInfo, spreadSrcAddrExpr, tys, fieldIndex, m) + let fieldId = anonInfo.SortedIds[fieldIndex] + let ty = tys[fieldIndex] + + let flds = + flds |> Map.change fieldId.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Rightward spread field shadowing leftward explicit field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3"; ...r1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let typars = tryAppTy g ty |> ValueOption.map (snd >> List.choose (tryDestTyparTy g >> ValueOption.toOption)) |> ValueOption.defaultValue [] + let fmtedSpreadField = LayoutRender.showL (NicePrint.prettyLayoutOfMemberSig env.DisplayEnv ([], fieldId.idText, typars, [], ty)) + warning (Error (FSComp.SR.tcRecordExprSpreadFieldShadowsExplicitField fmtedSpreadField, m)) + Some (LeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Spread field shadowing spread field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3" } + // let r3 = { ...r1; ...r2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))])) + + loopFieldsFromSpread flds (i + 1) fieldsFromSpread + + | _ :: fieldsFromSpread -> loopFieldsFromSpread flds i fieldsFromSpread + + let recordFieldsFromSpread = + if isRecdTy g tyOfSpreadSrcExpr then + ResolveRecordOrClassFieldsOfType cenv.nameResolver m ad tyOfSpreadSrcExpr false + else + tryDestAnonRecdTy g tyOfSpreadSrcExpr + |> ValueOption.map (fun (anonInfo, tys) -> + anonInfo.SortedIds + |> List.ofArray + |> List.mapi (fun i id -> Item.AnonRecdField (anonInfo, tys, i, id.idRange))) + |> ValueOption.defaultValue [] + + loopFieldsFromSpread flds i recordFieldsFromSpread + else + if not expr.IsArbExprAndThusAlreadyReportedError then + errorR (Error (FSComp.SR.tcRecordExprSpreadSourceMustBeRecord (), m)) + loopFieldsAndSpreads spreadSrcs flds i tpenv fieldsAndSpreads + + loopFieldsAndSpreads [] Map.empty 0 tpenv synRecdFields let flds = if hasOrigExpr then GroupUpdatesToNestedFields flds else flds // Check if the overall type is an anon record type and if so raise an copy-update syntax error // let f (r: {| A: int; C: int |}) = { r with A = 1; B = 2; C = 3 } if isAnonRecdTy cenv.g overallTy || isStructAnonRecdTy cenv.g overallTy then - for fld, _ in flds do + for ExplicitOrSpread.Explicit (fld, _) | ExplicitOrSpread.Spread (fld, _) in flds do let _, fldId = fld match TryFindAnonRecdFieldOfType g overallTy fldId.idText with | Some item -> @@ -7785,23 +7967,27 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, withExprOpt, synRecdFields, m // Use the right } in the expression let lastPartRange = withStartEnd (mkPos mWholeExpr.StartLine (mWholeExpr.EndColumn - 1)) (mkPos mWholeExpr.StartLine mWholeExpr.EndColumn) mWholeExpr errorR(Error(FSComp.SR.chkCopyUpdateSyntaxInAnonRecords(), lastPartRange)) - [] + [], [], tpenv else // If the overall type is a record type build a map of the fields - match flds with - | [] -> [] - | _ -> - match BuildFieldMap cenv env hasOrigExpr overallTy flds mWholeExpr with - | None -> [] - | Some(tinst, tcref, _, fldsList) -> + let fieldMap = + match flds with + | [] -> [] + | _ -> + match BuildFieldMap cenv env hasOrigExpr overallTy flds mWholeExpr with + | None -> [] + | Some(tinst, tcref, _, fldsList) -> - let gtyp = mkWoNullAppTy tcref tinst - UnifyTypes cenv env mWholeExpr overallTy gtyp + let gtyp = mkWoNullAppTy tcref tinst + UnifyTypes cenv env mWholeExpr overallTy gtyp - [ for n, v in fldsList do - match v with - | Some v -> yield n, v - | None -> () ] + [ for n, fld in fldsList do + match fld with + | ExplicitOrSpread.Explicit (Some v) -> yield n, ExplicitOrSpread.Explicit v + | ExplicitOrSpread.Spread (Some v) -> yield n, ExplicitOrSpread.Spread v + | _ -> () ] + + spreadSrcs, fieldMap, tpenv let withExprInfoOpt = match withExprOptChecked with @@ -7847,7 +8033,7 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, withExprOpt, synRecdFields, m SolveTypeAsError env.DisplayEnv cenv.css mWholeExpr overallTy mkDefault (mWholeExpr, overallTy), tpenv else - let expr, tpenv = TcRecordConstruction cenv overallTy false env tpenv withExprInfoOpt overallTy fldsList mWholeExpr + let expr, tpenv = TcRecordConstruction cenv overallTy false env tpenv withExprInfoOpt spreadSrcs overallTy fldsList mWholeExpr let expr = match superInitExprOpt with @@ -7856,12 +8042,6 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, withExprOpt, synRecdFields, m | None -> expr expr, tpenv -and CheckAnonRecdExprDuplicateFields (elems: Ident array) = - elems |> Array.iteri (fun i (uc1: Ident) -> - elems |> Array.iteri (fun j (uc2: Ident) -> - if j > i && uc1.idText = uc2.idText then - errorR(Error (FSComp.SR.tcAnonRecdDuplicateFieldId(uc1.idText), uc1.idRange)))) - // Check '{| .... |}' and TcAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, optOrigSynExpr, unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = match optOrigSynExpr with @@ -7872,7 +8052,10 @@ and TcAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, optOrigSynExpr, // Ideally we should also check for duplicate field IDs in the TcCopyAndUpdateAnonRecdExpr case, but currently the logic is too complex to guarantee a proper error reporting // So here we error instead errorR to avoid cascading internal errors unsortedFieldIdsAndSynExprsGiven - |> List.countBy (fun (fId, _, _) -> textOfLid fId.LongIdent) + |> List.choose (function + | SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (fieldName = SynLongIdent (name, _, _)), _) -> Some name + | SynExprAnonRecordFieldOrSpread.Spread _ -> (* Spreads are allowed to shadow fields. *) None) + |> List.countBy textOfLid |> List.iter (fun (label, count) -> if count > 1 then error (Error (FSComp.SR.tcAnonRecdDuplicateFieldId(label), mWholeExpr))) @@ -7881,39 +8064,372 @@ and TcAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, optOrigSynExpr, and TcNewAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = let g = cenv.g - let unsortedFieldSynExprsGiven = unsortedFieldIdsAndSynExprsGiven |> List.map (fun (_, _, fieldExpr) -> fieldExpr) - let unsortedFieldIds = unsortedFieldIdsAndSynExprsGiven |> List.map (fun (synLongIdent, _, _) -> synLongIdent.LongIdent[0]) |> List.toArray - let anonInfo, sortedFieldTys = UnifyAnonRecdTypeAndInferCharacteristics env.eContextInfo cenv env.DisplayEnv mWholeExpr overallTy isStruct unsortedFieldIds - - if unsortedFieldIds.Length > 1 then - CheckAnonRecdExprDuplicateFields unsortedFieldIds - - // Sort into canonical order - let sortedIndexedArgs = - unsortedFieldIdsAndSynExprsGiven - |> List.indexed - |> List.sortBy (fun (i,_) -> unsortedFieldIds[i].idText) + let ad = env.eAccessRights - // Map from sorted indexes to unsorted indexes - let sigma = sortedIndexedArgs |> List.map fst |> List.toArray - let sortedFieldExprs = sortedIndexedArgs |> List.map snd + let maybeAnonRecdTargetTy = tryDestAnonRecdTy g overallTy + + let spreadSrcs, unsortedCheckedFields, anonInfo, tpenv = + let (|LeftwardExplicit|NoLeftwardExplicit|) hasLeftwardExplicit = if hasLeftwardExplicit then LeftwardExplicit else NoLeftwardExplicit + let LeftwardExplicit = true + let NoLeftwardExplicit = false + + let allSortedFieldTys, dedupedSortedFieldTys, tcFieldExprAt = + let possibleTargetTyAt = + match maybeAnonRecdTargetTy with + | ValueSome (anonInfo, tys) -> + let names = anonInfo.SortedNames + let tys = List.toArray tys + fun name -> + let i = Array.BinarySearch (names, name) + if i < 0 then ValueNone + else ValueSome tys[i] + | ValueNone -> fun _ -> ValueNone + + // ---------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------- + // TODO: Collect spread src exprs so we don't re-typecheck them? + // TODO: It would be better if we could _try_ to typecheck fields and undo if they + // end up being shadowed later... + // ---------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------- + + let rec mkTcFuncs tys i fieldsAndSpreads = + match fieldsAndSpreads with + | [] -> + // If the target type is a known anonymous record type, + // keep only those fields that are present in that type + // or that are explicitly defined in this one. + let tys = + maybeAnonRecdTargetTy + |> ValueOption.map (fun (anonInfo, _) -> + let sortedNames = anonInfo.SortedNames + tys + |> Map.filter (fun fieldId field -> + match field with + | LeftwardExplicit, _ -> true + | NoLeftwardExplicit, _ -> Array.BinarySearch (sortedNames, fieldId) >= 0)) + |> ValueOption.defaultValue tys + + let dedupedSortedFieldTys = tys |> Map.map (fun _ (_, tys) -> let _, _, ty = List.head tys in ty) + + let indexedTcFuncs = + (Map.empty, tys) + ||> Map.fold (fun acc _ (_, tys) -> + let (i, _, ty), tys = List.headAndTail tys + let acc = acc |> Map.add i (fun _ cenv env expr tpenv -> ty, TcExprFlex cenv true false ty env tpenv expr) + (acc, tys) + ||> List.fold (fun acc (i, _, ty) -> + acc |> Map.add i (fun m _ _ _ tpenv -> ty, (mkThrow m ty (mkOne g m), tpenv)))) + + tys, dedupedSortedFieldTys, fun i m cenv env expr tpenv -> + indexedTcFuncs + |> Map.tryFind i + |> Option.map (fun tc -> tc m cenv env expr tpenv) + |> Option.defaultWith (fun () -> g.obj_ty_ambivalent, (mkThrow m g.obj_ty_ambivalent (mkOne g m), tpenv)) + + | SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (fieldName = SynLongIdent (([] | _ :: _ :: _), _, _); range = m), _) :: _ -> + error (InternalError ("All field names should have been transformed into simple identifiers by this point.", m)) + + // Explicitly redeclared fields are not allowed: + // {| A = 3; A = 4 |} + // ↑ error FS3522 + | SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (fieldName = SynLongIdent ([fieldId], _, _)), _) :: fieldsAndSpreads -> + let ty = possibleTargetTyAt fieldId.idText |> ValueOption.defaultWith (fun () -> NewInferenceType g) + + let tys = + tys |> Map.change fieldId.idText (function + | None -> Some (LeftwardExplicit, [i, fieldId, ty]) + | Some (LeftwardExplicit, dupes) -> Some (LeftwardExplicit, (i, fieldId, ty) :: dupes) + | Some (NoLeftwardExplicit, _dupes) -> Some (LeftwardExplicit, [i, fieldId, ty])) + + mkTcFuncs tys (i + 1) fieldsAndSpreads + + // Field shadowing from spreads is allowed: + // let a = {| A = 3 |} + // let b = {| A = "4" |} + // let c = {| ...a; ...b |} → {| A = "4" |} + | SynExprAnonRecordFieldOrSpread.Spread (SynExprSpread (expr = expr; range = m), _) :: fieldsAndSpreads -> + checkLanguageFeatureAndRecover g.langVersion LanguageFeature.RecordSpreads m + + let flex = false + let spreadSrcExpr, _ = TcExprFlex cenv flex false (NewInferenceType g) env tpenv expr + let tyOfSpreadSrcExpr = tyOfExpr g spreadSrcExpr + + let fieldsFromSpread = + if isRecdTy g tyOfSpreadSrcExpr then + ResolveRecordOrClassFieldsOfType cenv.nameResolver m ad tyOfSpreadSrcExpr false + |> List.choose (function + | Item.RecdField field -> + let fieldId = field.RecdField.Id + Some (fieldId, field.FieldType) + | _ -> None) + else + match tryDestAnonRecdTy g tyOfSpreadSrcExpr with + | ValueSome (anonInfo, tys) -> + tys |> List.mapi (fun j ty -> + let fieldId = anonInfo.SortedIds[j] + fieldId, ty) + | ValueNone -> [] + + let i, tys = + ((i, tys), fieldsFromSpread) + ||> List.fold (fun (i, tys) (fieldId, ty) -> + i + 1, tys |> Map.change fieldId.idText (function + | None -> Some (NoLeftwardExplicit, [i, fieldId, ty]) + | Some (LeftwardExplicit, _dupes) -> Some (LeftwardExplicit, [i, fieldId, ty]) + | Some (NoLeftwardExplicit, _dupes) -> Some (NoLeftwardExplicit, [i, fieldId, ty]))) + + mkTcFuncs tys i fieldsAndSpreads + + mkTcFuncs Map.empty 0 unsortedFieldIdsAndSynExprsGiven + + // Unify the overall ty with the inferred target anonymous record type. + let anonInfo, sortedFieldTys = + let anonInfo, sortedFieldTys = + let unsortedNames = + allSortedFieldTys + |> Map.toList + |> List.collect (fun (_, (_, dupes)) -> dupes) + |> List.sortBy (fun (i, _, _) -> i) + |> List.map (fun (_, fieldId, _) -> fieldId) + |> List.toArray + + match maybeAnonRecdTargetTy with + | ValueSome (anonInfo, _) -> + // Note: use the assembly of the known type, not the current assembly + // Note: use the structness of the known type, unless explicit + // Note: use the names of our type, since they are always explicit + let tupInfo = if isStruct then tupInfoStruct else anonInfo.TupInfo + let anonInfo = AnonRecdTypeInfo.Create(anonInfo.Assembly, tupInfo, unsortedNames) + let sortedFieldTys = + [ + for KeyValue (_, (_, dupes)) in allSortedFieldTys do + for _, _, ty in dupes do + ty + ] + anonInfo, sortedFieldTys + | ValueNone -> + // Note: no known anonymous record type - use our assembly + let anonInfo = AnonRecdTypeInfo.Create(cenv.thisCcu, mkTupInfo isStruct, unsortedNames) + let sortedFieldTys = + [ + for KeyValue (_, (_, dupes)) in allSortedFieldTys do + for _, _, ty in dupes do + ty + ] + anonInfo, sortedFieldTys + let ty2 = TType_anon (anonInfo, sortedFieldTys) + AddCxTypeEqualsType env.eContextInfo env.DisplayEnv cenv.css mWholeExpr overallTy ty2 + anonInfo, sortedFieldTys + + // All sorted field identifiers, including potential duplicates. + let sortedNames = + [| + for KeyValue (_, (_, dupes)) in allSortedFieldTys do + for _, fieldName, _ in dupes do + fieldName + |] + + // Call name resolution. + sortedNames + |> Array.iteri (fun j fieldName -> + let m = fieldName.idRange + let item = Item.AnonRecdField(anonInfo, sortedFieldTys, j, m) + CallNameResolutionSink cenv.tcSink (m, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Use, env.eAccessRights)) + + let rec tcFieldsAndSpreads spreadSrcs checkedFields i tpenv fieldsAndSpreads = + let (|LeftwardExplicit|NoLeftwardExplicit|) hasLeftwardExplicit = if hasLeftwardExplicit then LeftwardExplicit else NoLeftwardExplicit + let LeftwardExplicit = true + let NoLeftwardExplicit = false + + match fieldsAndSpreads with + | [] -> + // If the target type is a known anonymous record type, + // keep only those fields that are present in that type + // or that are explicitly defined in this one. + let checkedFields = + maybeAnonRecdTargetTy + |> ValueOption.map (fun (anonInfo, _) -> + let sortedNames = anonInfo.SortedNames + checkedFields + |> Map.filter (fun fieldId field -> + match field with + | LeftwardExplicit, _ -> true + | NoLeftwardExplicit, _ -> Array.BinarySearch (sortedNames, fieldId) >= 0)) + |> ValueOption.defaultValue checkedFields + + // We must emit let-bindings for the source expressions in their original order. + // TODO: We technically have enough information in the `checkedFields` map to avoid the re-sorting + // that happens here and in `mkAnonRecd`. + let checkedFieldsInOriginalOrder = + Map.toList checkedFields + |> List.collect (fun (_, (_, dupes)) -> dupes) + |> List.sortBy (fun (i, _, _, _) -> i) + |> List.map (fun (_, fieldId, ty, expr) -> fieldId, ty, expr) + + List.rev spreadSrcs, checkedFieldsInOriginalOrder, anonInfo, tpenv + + | SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (fieldName = SynLongIdent (([] | _ :: _ :: _), _, _); range = m), _) :: _ -> + error (InternalError ("All field names should have been transformed into simple identifiers by this point.", m)) + + // Explicitly redeclared fields are not allowed: + // {| A = 3; A = 4 |} + // ↑ error FS3522 + | SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (fieldName = SynLongIdent ([fieldId], _, _); expr = expr; range = m), _) :: fieldsAndSpreads -> + let ty, (expr, tpenv) = tcFieldExprAt i m cenv env expr tpenv + + let checkedFields = + checkedFields |> Map.change fieldId.idText (function + // The first field of this name, explicit or spread. + | None -> + Some (LeftwardExplicit, [i, fieldId, ty, expr]) + + // Rightward explicit duplicate of leftward explicit field, potentially with intervening spreads. + // + // let r1 = { A = 3; A = "3" } + // + // or + // + // let r1 = { A = 3.14 } + // let r2 = { A = 3; ...r1; A = "3" } + // + // Keep both, but error. + | Some (LeftwardExplicit, dupes) -> + errorR (Error (FSComp.SR.tcAnonRecdDuplicateFieldId fieldId.idText, m)) + Some (LeftwardExplicit, (i, fieldId, ty, expr) :: dupes) - sortedFieldExprs |> List.iteri (fun j (synLongIdent, _, _) -> - let m = rangeOfLid synLongIdent.LongIdent - let item = Item.AnonRecdField(anonInfo, sortedFieldTys, j, m) - CallNameResolutionSink cenv.tcSink (m, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Use, env.eAccessRights)) + // Rightward explicit field shadowing leftward spread field. + // + // let r1 = { A = 3 } + // let r2 = { ...r1; A = "3" } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (LeftwardExplicit, [i, fieldId, ty, expr])) + + tcFieldsAndSpreads spreadSrcs checkedFields (i + 1) tpenv fieldsAndSpreads + + // Field shadowing from spreads is allowed: + // let a = {| A = 3 |} + // let b = {| A = "4" |} + // let c = {| ...a; ...b |} → {| A = "4" |} + | SynExprAnonRecordFieldOrSpread.Spread (SynExprSpread (expr = expr; range = m), _) :: fieldsAndSpreads -> + checkLanguageFeatureAndRecover g.langVersion LanguageFeature.RecordSpreads m + + let flex = false + let spreadSrcExpr, tpenv = TcExprFlex cenv flex false (NewInferenceType g) env tpenv expr + let tyOfSpreadSrcExpr = tyOfExpr g spreadSrcExpr + + if isRecdTy g tyOfSpreadSrcExpr || isAnonRecdTy g tyOfSpreadSrcExpr then + let spreadSrcAddrExpr, spreadSrcs = + let spreadSrcAddrVal, spreadSrcAddrExpr = mkCompGenLocal mWholeExpr "spreadSrc" (if isStructTy g overallTy then mkByrefTy g overallTy else overallTy) + let wrap, oldAddr, _readonly, _writeonly = mkExprAddrOfExpr g (isStructTy g tyOfSpreadSrcExpr) false NeverMutates spreadSrcExpr None m + spreadSrcAddrExpr, (fun expr -> wrap (mkCompGenLet m spreadSrcAddrVal oldAddr expr)) :: spreadSrcs + + let rec tcFieldsFromSpread checkedFields i fieldsFromSpread = + match fieldsFromSpread with + | [] -> tcFieldsAndSpreads spreadSrcs checkedFields i tpenv fieldsAndSpreads + + | Item.RecdField fieldInfo :: fieldsFromSpread -> + let fieldExpr = mkRecdFieldGetViaExprAddr (spreadSrcAddrExpr, fieldInfo.RecdFieldRef, fieldInfo.TypeInst, m) + let fieldId = fieldInfo.RecdFieldRef.RecdField.Id + ignore dedupedSortedFieldTys + let ty = fieldInfo.FieldType + + let checkedFields = + checkedFields |> Map.change fieldId.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, fieldId, ty, fieldExpr]) + + // Rightward spread field shadowing leftward explicit field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3"; ...r1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let fmtedSpreadField = NicePrint.stringOfRecdField env.DisplayEnv cenv.infoReader fieldInfo.TyconRef fieldInfo.RecdField + warning (Error (FSComp.SR.tcRecordExprSpreadFieldShadowsExplicitField fmtedSpreadField, m)) + Some (LeftwardExplicit, [i, fieldId, ty, fieldExpr]) + + // Spread field shadowing spread field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3" } + // let r3 = { ...r1; ...r2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, fieldId, ty, fieldExpr])) + + tcFieldsFromSpread checkedFields (i + 1) fieldsFromSpread + + | Item.AnonRecdField (anonInfo, tys, fieldIndex, _) :: fieldsFromSpread -> + let fieldExpr = mkAnonRecdFieldGet g (anonInfo, spreadSrcAddrExpr, tys, fieldIndex, m) + let fieldId = anonInfo.SortedIds[fieldIndex] + let ty = tys[fieldIndex] + + let checkedFields = + checkedFields |> Map.change fieldId.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, fieldId, ty, fieldExpr]) + + // Rightward spread field shadowing leftward explicit field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3"; ...r1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let typars = tryAppTy g ty |> ValueOption.map (snd >> List.choose (tryDestTyparTy g >> ValueOption.toOption)) |> ValueOption.defaultValue [] + let fmtedSpreadField = LayoutRender.showL (NicePrint.prettyLayoutOfMemberSig env.DisplayEnv ([], fieldId.idText, typars, [], ty)) + warning (Error (FSComp.SR.tcRecordExprSpreadFieldShadowsExplicitField fmtedSpreadField, m)) + Some (LeftwardExplicit, [i, fieldId, ty, fieldExpr]) + + // Spread field shadowing spread field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3" } + // let r3 = { ...r1; ...r2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, fieldId, ty, fieldExpr])) + + tcFieldsFromSpread checkedFields (i + 1) fieldsFromSpread + + | _ :: fields -> tcFieldsFromSpread checkedFields i fields + + let recordFieldsFromSpread = + if isRecdTy g tyOfSpreadSrcExpr then + ResolveRecordOrClassFieldsOfType cenv.nameResolver m ad tyOfSpreadSrcExpr false + else + tryDestAnonRecdTy g tyOfSpreadSrcExpr + |> ValueOption.map (fun (anonInfo, tys) -> + anonInfo.SortedIds + |> List.ofArray + |> List.mapi (fun i id -> Item.AnonRecdField (anonInfo, tys, i, id.idRange))) + |> ValueOption.defaultValue [] + + tcFieldsFromSpread checkedFields i recordFieldsFromSpread + else + if not expr.IsArbExprAndThusAlreadyReportedError then + errorR (Error (FSComp.SR.tcAnonRecordExprSpreadSourceMustBeRecord (), expr.Range)) + tcFieldsAndSpreads spreadSrcs checkedFields i tpenv fieldsAndSpreads - let unsortedFieldTys = - sortedFieldTys - |> List.indexed - |> List.sortBy (fun (sortedIdx, _) -> sigma[sortedIdx]) - |> List.map snd + tcFieldsAndSpreads [] Map.empty 0 tpenv unsortedFieldIdsAndSynExprsGiven - let flexes = unsortedFieldTys |> List.map (fun _ -> true) + let unsortedNames = [| for fieldName, _, _ in unsortedCheckedFields -> fieldName |] + let unsortedTys = [ for _, fieldTy, _ in unsortedCheckedFields -> fieldTy ] + let unsortedExprs = [ for _, _, fieldExpr in unsortedCheckedFields -> fieldExpr ] - let unsortedCheckedArgs, tpenv = TcExprsWithFlexes cenv env mWholeExpr tpenv flexes unsortedFieldTys unsortedFieldSynExprsGiven + let expr = + (spreadSrcs, mkAnonRecd g mWholeExpr anonInfo unsortedNames unsortedExprs unsortedTys) + ||> List.foldBack (fun wrap expr -> wrap expr) - mkAnonRecd g mWholeExpr anonInfo unsortedFieldIds unsortedCheckedArgs unsortedFieldTys, tpenv + expr, tpenv and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (origExpr, blockSeparator), unsortedFieldIdsAndSynExprsGiven, mWholeExpr) = // The fairly complex case '{| origExpr with X = 1; Y = 2 |}' @@ -7926,6 +8442,7 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or // Unlike in the case of record type copy-and-update {| a with X = 1 |} does not force a.X to exist or have had type 'int' let g = cenv.g + let ad = env.eAccessRights let origExprTy = NewInferenceType g let origExprChecked, tpenv = TcExpr cenv (MustEqual origExprTy) env tpenv origExpr let oldv, oldve = mkCompGenLocal mWholeExpr "inputRecord" origExprTy @@ -7934,17 +8451,191 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or if not (isAppTy g origExprTy || isAnonRecdTy g origExprTy) then error (Error (FSComp.SR.tcCopyAndUpdateNeedsRecordType(), mOrigExpr)) - // Expand expressions with respect to potential nesting - let unsortedFieldIdsAndSynExprsGiven = - unsortedFieldIdsAndSynExprsGiven - |> List.map (fun (synLongIdent, _, exprBeingAssigned) -> - match synLongIdent.LongIdent with - | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), mWholeExpr)) - | [ id ] -> ([], id), Some exprBeingAssigned - | lid -> TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparator)) - |> GroupUpdatesToNestedFields + let spreadSrcs, unsortedFieldIdsAndSynExprsGiven, tpenv = + // Collect explicitly-defined fields and fields from spreads + // and expand expressions with respect to potential nesting. + let rec collectFields spreadSrcs flds i tpenv fieldsAndSpreads = + let (|LeftwardExplicit|NoLeftwardExplicit|) hasLeftwardExplicit = if hasLeftwardExplicit then LeftwardExplicit else NoLeftwardExplicit + let LeftwardExplicit = true + let NoLeftwardExplicit = false - let unsortedFieldSynExprsGiven = unsortedFieldIdsAndSynExprsGiven |> List.choose snd + match fieldsAndSpreads with + | [] -> + // If the target type is a known anonymous record type, + // keep only those fields that are present in that type + // or that are explicitly defined in this one. + let shouldKeep = + match tryDestAnonRecdTy g overallTy with + | ValueSome (anonInfo, _) -> + let sortedNames = anonInfo.SortedNames + fun fieldId -> Array.BinarySearch (sortedNames, fieldId) >= 0 + | ValueNone -> fun _ -> true + + let fieldsInOriginalOrder = + flds + |> Map.toList + |> List.collect (function + | _, (LeftwardExplicit, dupes) -> dupes + | fieldId, (NoLeftwardExplicit, dupes) -> if shouldKeep fieldId then dupes else []) + |> List.sortBy (fun (i, _) -> i) + |> List.map (fun (_, field) -> field) + + List.rev spreadSrcs, fieldsInOriginalOrder, tpenv + + | SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (fieldName = synLongIdent; expr = exprBeingAssigned; range = m), _) :: fieldsAndSpreads -> + let isFromNestedUpdate, fieldId, field = + match synLongIdent.LongIdent with + | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(), mWholeExpr)) + | [ id ] -> false, id, ExplicitOrSpread.Explicit (([], id), Some exprBeingAssigned) + | lid -> + let _, id as longIdent, exprBeingAssigned = TransformAstForNestedUpdates cenv env origExprTy lid exprBeingAssigned (origExpr, blockSeparator) + true, id, ExplicitOrSpread.Explicit (longIdent, exprBeingAssigned) + + let flds = + flds |> Map.change fieldId.idText (function + // The first field of this name, explicit or spread. + | None -> + Some (LeftwardExplicit, [i, field]) + + // Rightward explicit duplicate of leftward explicit field, potentially with intervening spreads. + // + // let r1 = { A = 3; A = "3" } + // + // or + // + // let r1 = { A = 3.14 } + // let r2 = { A = 3; ...r1; A = "3" } + // + // Keep both, but error. + | Some (LeftwardExplicit, dupes) -> + if not isFromNestedUpdate then + errorR (Error (FSComp.SR.tcAnonRecdDuplicateFieldId fieldId.idText, m)) + Some (LeftwardExplicit, (i, field) :: dupes) + + // Rightward explicit field shadowing leftward spread field. + // + // let r1 = { A = 3 } + // let r2 = { ...r1; A = "3" } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (LeftwardExplicit, [i, field])) + + collectFields spreadSrcs flds (i + 1) tpenv fieldsAndSpreads + + | SynExprAnonRecordFieldOrSpread.Spread (SynExprSpread (expr = expr; range = m), _) :: fieldsAndSpreads -> + checkLanguageFeatureAndRecover g.langVersion LanguageFeature.RecordSpreads m + + let flex = false + let spreadSrcExpr, tpenv = TcExprFlex cenv flex false (NewInferenceType g) env tpenv expr + let tyOfSpreadSrcExpr = tyOfExpr g spreadSrcExpr + + if isRecdTy g tyOfSpreadSrcExpr || isAnonRecdTy g tyOfSpreadSrcExpr then + let spreadSrcAddrExpr, spreadSrcs = + let spreadSrcAddrVal, spreadSrcAddrExpr = mkCompGenLocal mWholeExpr "spreadSrc" (if isStructTy g overallTy then mkByrefTy g overallTy else overallTy) + let wrap, oldAddr, _readonly, _writeonly = mkExprAddrOfExpr g (isStructTy g tyOfSpreadSrcExpr) false NeverMutates spreadSrcExpr None m + spreadSrcAddrExpr, (fun expr -> wrap (mkCompGenLet m spreadSrcAddrVal oldAddr expr)) :: spreadSrcs + + let rec collectFieldsFromSpread flds i fieldsFromSpread = + match fieldsFromSpread with + | [] -> collectFields spreadSrcs flds i tpenv fieldsAndSpreads + + | Item.RecdField fieldInfo :: fieldsFromSpread -> + let fieldExpr = mkRecdFieldGetViaExprAddr (spreadSrcAddrExpr, fieldInfo.RecdFieldRef, fieldInfo.TypeInst, m) + let fieldId = fieldInfo.RecdFieldRef.RecdField.Id + let ty = fieldInfo.FieldType + + let flds = + flds |> Map.change fieldId.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Rightward spread field shadowing leftward explicit field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3"; ...r1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let fmtedSpreadField = NicePrint.stringOfRecdField env.DisplayEnv cenv.infoReader fieldInfo.TyconRef fieldInfo.RecdField + warning (Error (FSComp.SR.tcRecordExprSpreadFieldShadowsExplicitField fmtedSpreadField, m)) + Some (LeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Spread field shadowing spread field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3" } + // let r3 = { ...r1; ...r2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))])) + + collectFieldsFromSpread flds (i + 1) fieldsFromSpread + + | Item.AnonRecdField (anonInfo, tys, fieldIndex, _) :: fieldsFromSpread -> + let fieldExpr = mkAnonRecdFieldGet g (anonInfo, spreadSrcAddrExpr, tys, fieldIndex, m) + let fieldId = anonInfo.SortedIds[fieldIndex] + let ty = tys[fieldIndex] + + let flds = + flds |> Map.change fieldId.idText (function + // The first field with this name, spread or explicit. + | None -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Rightward spread field shadowing leftward explicit field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3"; ...r1 } + // + // Keep right, but warn. + | Some (LeftwardExplicit, _dupes) -> + let typars = tryAppTy g ty |> ValueOption.map (snd >> List.choose (tryDestTyparTy g >> ValueOption.toOption)) |> ValueOption.defaultValue [] + let fmtedSpreadField = LayoutRender.showL (NicePrint.prettyLayoutOfMemberSig env.DisplayEnv ([], fieldId.idText, typars, [], ty)) + warning (Error (FSComp.SR.tcRecordExprSpreadFieldShadowsExplicitField fmtedSpreadField, m)) + Some (LeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))]) + + // Spread field shadowing spread field. + // + // let r1 = { A = 3 } + // let r2 = { A = "3" } + // let r3 = { ...r1; ...r2 } + // + // Keep right. + | Some (NoLeftwardExplicit, _dupes) -> + Some (NoLeftwardExplicit, [i, ExplicitOrSpread.Spread (([], fieldId), Some (ty, fieldExpr))])) + + collectFieldsFromSpread flds (i + 1) fieldsFromSpread + + | _ :: fieldsFromSpread -> collectFieldsFromSpread flds i fieldsFromSpread + + let recordFieldsFromSpread = + if isRecdTy g tyOfSpreadSrcExpr then + ResolveRecordOrClassFieldsOfType cenv.nameResolver m ad tyOfSpreadSrcExpr false + else + tryDestAnonRecdTy g tyOfSpreadSrcExpr + |> ValueOption.map (fun (anonInfo, tys) -> + anonInfo.SortedIds + |> List.ofArray + |> List.mapi (fun i id -> Item.AnonRecdField (anonInfo, tys, i, id.idRange))) + |> ValueOption.defaultValue [] + + collectFieldsFromSpread flds i recordFieldsFromSpread + else + if not expr.IsArbExprAndThusAlreadyReportedError then + errorR (Error (FSComp.SR.tcAnonRecordExprSpreadSourceMustBeRecord (), m)) + collectFields spreadSrcs flds i tpenv fieldsAndSpreads + + let spreadSrcs, unsortedFieldIdsAndSynExprsGiven, tpenv = collectFields [] Map.empty 0 tpenv unsortedFieldIdsAndSynExprsGiven + spreadSrcs, GroupUpdatesToNestedFields unsortedFieldIdsAndSynExprsGiven, tpenv + + let unsortedFieldSynExprsGiven = + unsortedFieldIdsAndSynExprsGiven + |> List.choose (function + | ExplicitOrSpread.Explicit (_, expr) -> expr |> Option.map ExplicitOrSpread.Explicit + | ExplicitOrSpread.Spread (_, expr) -> expr |> Option.map ExplicitOrSpread.Spread) let origExprIsStruct = match tryDestAnonRecdTy g origExprTy with @@ -7961,8 +8652,13 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or /// - Choice2Of2 for a binding coming from the original expression let unsortedIdAndExprsAll = [| - for (_, id), e in unsortedFieldIdsAndSynExprsGiven do - yield (id, Choice1Of2 e) + for field in unsortedFieldIdsAndSynExprsGiven do + match field with + | ExplicitOrSpread.Explicit ((_, id), e) -> + yield (id, Choice1Of2 (ExplicitOrSpread.Explicit e)) + | ExplicitOrSpread.Spread ((_, id), e) -> + yield (id, Choice1Of2 (ExplicitOrSpread.Spread e)) + match tryDestAnonRecdTy g origExprTy with | ValueSome (anonInfo, tinst) -> for i, id in Array.indexed anonInfo.SortedIds do @@ -8008,11 +8704,14 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or unsortedFieldTysAll |> List.take unsortedFieldIdsAndSynExprsGiven.Length - let flexes = unsortedFieldTysGiven |> List.map (fun _ -> true) - // Check the expressions in unsorted order let unsortedFieldExprsGiven, tpenv = - TcExprsWithFlexes cenv env mWholeExpr tpenv flexes unsortedFieldTysGiven unsortedFieldSynExprsGiven + (tpenv, List.zip unsortedFieldSynExprsGiven unsortedFieldTysGiven) ||> List.mapFold (fun tpenv (synExprOrSpreadValue, fieldTy) -> + match synExprOrSpreadValue with + | ExplicitOrSpread.Explicit synExpr -> TcExprFlex cenv true false fieldTy env tpenv synExpr + | ExplicitOrSpread.Spread (ty, expr) -> + AddCxTypeMustSubsumeType env.eContextInfo env.DisplayEnv cenv.css expr.Range NoTrace fieldTy ty + expr, tpenv) let unsortedFieldExprsGiven = unsortedFieldExprsGiven |> List.toArray @@ -8030,7 +8729,7 @@ and TcCopyAndUpdateAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, (or // Permute the expressions to sorted order in the TAST let expr = mkAnonRecd g mWholeExpr anonInfo unsortedFieldIds unsortedFieldExprs unsortedFieldTysAll - let expr = wrap expr + let expr = (wrap :: spreadSrcs, expr) ||> List.foldBack (fun wrap expr -> wrap expr) // Bind the original expression let expr = mkCompGenLet mOrigExpr oldv origExprChecked expr @@ -9166,7 +9865,9 @@ and TcImplicitOpItemThen (cenv: cenv) overallTy env id sln tpenv mItem delayed = | SynExpr.Tuple (_, synExprs, _, _) | SynExpr.ArrayOrList (_, synExprs, _) -> synExprs |> List.forall isSimpleArgument - | SynExpr.Record (copyInfo=copyOpt; recordFields=fields) -> copyOpt |> Option.forall (fst >> isSimpleArgument) && fields |> List.forall ((fun (SynExprRecordField(expr=e)) -> e) >> Option.forall isSimpleArgument) + | SynExpr.Record (copyInfo=copyOpt; recordFields=fields) -> + copyOpt |> Option.forall (fst >> isSimpleArgument) + && fields |> List.forall ((function SynExprRecordFieldOrSpread.Field (SynExprRecordField(expr=e)) -> e | _ -> None) >> Option.forall isSimpleArgument) | SynExpr.App (_, _, synExpr, synExpr2, _) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 | SynExpr.IfThenElse (ifExpr=synExpr; thenExpr=synExpr2; elseExpr=synExprOpt) -> isSimpleArgument synExpr && isSimpleArgument synExpr2 && Option.forall isSimpleArgument synExprOpt | SynExpr.DotIndexedGet (synExpr, _, _, _) -> isSimpleArgument synExpr diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fsi b/src/Compiler/Checking/Expressions/CheckExpressions.fsi index 9e3014896c8..89bcbfa7377 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fsi +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fsi @@ -895,15 +895,21 @@ val UnifyTupleTypeAndInferCharacteristics: 'T list -> TupInfo * TTypes +/// Helper used to check for duplicate fields in records. +val CheckRecdExprDuplicateFields: elems: Ident list -> unit + /// Helper used to check both record expressions and record patterns val BuildFieldMap: cenv: TcFileState -> env: TcEnv -> isPartial: bool -> ty: TType -> - flds: ((Ident list * Ident) * 'T) list -> + flds: ExplicitOrSpread<(Ident list * Ident) * 'Explicit, (Ident list * Ident) * 'Spread> list -> m: range -> - (TypeInst * TyconRef * Map * (string * 'T) list) option + (TypeInst * + TyconRef * + Map> * + (string * ExplicitOrSpread<'Explicit, 'Spread>) list) option /// Check a long identifier 'Case' or 'Case argsR' that has been resolved to an active pattern case val TcPatLongIdentActivePatternCase: diff --git a/src/Compiler/Checking/NameResolution.fs b/src/Compiler/Checking/NameResolution.fs index 2993a3e1c3f..e70b27d4c7b 100644 --- a/src/Compiler/Checking/NameResolution.fs +++ b/src/Compiler/Checking/NameResolution.fs @@ -3817,8 +3817,19 @@ let SuggestLabelsOfRelatedRecords g (nenv: NameResolutionEnv) (id: Ident) (allFi UndefinedName(0, FSComp.SR.undefinedNameRecordLabel, id, suggestLabels) +[] +type internal ExplicitOrSpread<'Explicit, 'Spread> = + /// An expression or value derived from an explicit member or record field. + | Explicit of 'Explicit + + /// An expression or value derived from a member or field coming from a spread. + | Spread of 'Spread + +let (|ExplicitOrSpread|) (ExplicitOrSpread.Explicit value | ExplicitOrSpread.Spread value) = value + /// Resolve a long identifier representing a record field -let ResolveFieldPrim sink (ncenv: NameResolver) nenv ad ty (mp, id: Ident) allFields = +let ResolveFieldPrim sink (ncenv: NameResolver) nenv ad fldInfo allFields = + let (ExplicitOrSpread (ty, mp, id: Ident)) = fldInfo let typeNameResInfo = TypeNameResolutionInfo.Default let g = ncenv.g let m = id.idRange @@ -3844,9 +3855,10 @@ let ResolveFieldPrim sink (ncenv: NameResolver) nenv ad ty (mp, id: Ident) allFi match tryTcrefOfAppTy g ty with | ValueSome tcref -> match ncenv.InfoReader.TryFindRecdOrClassFieldInfoOfType(id.idText, m, ty) with - | ValueSome (RecdFieldInfo(_, rfref)) -> [ResolutionInfo.Empty, FieldResolution(FreshenRecdFieldRef ncenv m rfref, false)] + | ValueSome (RecdFieldInfo(_, rfref)) -> Some [ResolutionInfo.Empty, FieldResolution(FreshenRecdFieldRef ncenv m rfref, false)] | _ -> - if tcref.IsRecordTycon then + if fldInfo.IsSpread then None + elif tcref.IsRecordTycon then // record label doesn't belong to record type -> suggest other labels of same record let suggestLabels (addToBuffer: string -> unit) = for label in SuggestOtherLabelsOfSameRecordType g nenv ty id allFields do @@ -3856,8 +3868,8 @@ let ResolveFieldPrim sink (ncenv: NameResolver) nenv ad ty (mp, id: Ident) allFi let errorText = FSComp.SR.nrRecordDoesNotContainSuchLabel(typeName, id.idText) error(ErrorWithSuggestions(errorText, m, id.idText, suggestLabels)) else - lookup() - | ValueNone -> lookup() + Some (lookup()) + | ValueNone -> Some (lookup()) | _ -> let lid = (mp@[id]) let tyconSearch ad () = @@ -3888,17 +3900,18 @@ let ResolveFieldPrim sink (ncenv: NameResolver) nenv ad ty (mp, id: Ident) allFi if not (isNil rest) then errorR(Error(FSComp.SR.nrInvalidFieldLabel(), (List.head rest).idRange)) - [(resInfo, item)] + Some [(resInfo, item)] -let ResolveField sink ncenv nenv ad ty mp id allFields = - let res = ResolveFieldPrim sink ncenv nenv ad ty (mp, id) allFields +let ResolveField sink ncenv nenv ad fldInfo allFields = + let res = ResolveFieldPrim sink ncenv nenv ad fldInfo allFields // Register the results of any field paths "Module.Type" in "Module.Type.field" as a name resolution. (Note, the path resolution // info is only non-empty if there was a unique resolution of the field) - let checker = ResultTyparChecker(fun () -> true) res - |> List.map (fun (resInfo, rfref) -> - ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurrence.UseInType, ad, resInfo, checker) - rfref) + |> Option.map (fun res -> + let checker = ResultTyparChecker(fun () -> true) + res |> List.map (fun (resInfo, rfref) -> + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurrence.UseInType, ad, resInfo, checker) + rfref)) /// Resolve a long identifier representing a nested record field. /// diff --git a/src/Compiler/Checking/NameResolution.fsi b/src/Compiler/Checking/NameResolution.fsi index c4e08188c4c..67f3b402565 100755 --- a/src/Compiler/Checking/NameResolution.fsi +++ b/src/Compiler/Checking/NameResolution.fsi @@ -812,17 +812,25 @@ val internal ResolveTypeLongIdent: genOk: PermitDirectReferenceToGeneratedType -> ResultOrException +[] +type internal ExplicitOrSpread<'Explicit, 'Spread> = + /// An expression or value derived from an explicit member or record field. + | Explicit of 'Explicit + + /// An expression or value derived from a member or field coming from a spread. + | Spread of 'Spread + +val (|ExplicitOrSpread|): ExplicitOrSpread<'Value, 'Value> -> 'Value + /// Resolve a long identifier to a field val internal ResolveField: sink: TcResultsSink -> ncenv: NameResolver -> nenv: NameResolutionEnv -> ad: AccessorDomain -> - ty: TType -> - mp: Ident list -> - id: Ident -> + fldInfo: ExplicitOrSpread -> allFields: Ident list -> - FieldResolution list + FieldResolution list option /// Resolve a long identifier to a nested field val internal ResolveNestedField: diff --git a/src/Compiler/Driver/CompilerDiagnostics.fs b/src/Compiler/Driver/CompilerDiagnostics.fs index 71b0ba0eb2c..ef1b9837643 100644 --- a/src/Compiler/Driver/CompilerDiagnostics.fs +++ b/src/Compiler/Driver/CompilerDiagnostics.fs @@ -1143,7 +1143,8 @@ type Exception with | Parser.TOKEN_COLON_QMARK -> SR.GetString("Parser.TOKEN.COLON.QMARK") | Parser.TOKEN_INT32_DOT_DOT -> SR.GetString("Parser.TOKEN.INT32.DOT.DOT") | Parser.TOKEN_DOT_DOT -> SR.GetString("Parser.TOKEN.DOT.DOT") - | Parser.TOKEN_DOT_DOT_HAT -> SR.GetString("Parser.TOKEN.DOT.DOT") + | Parser.TOKEN_DOT_DOT_HAT -> SR.GetString("Parser.TOKEN.DOT.DOT.HAT") + | Parser.TOKEN_DOT_DOT_DOT -> SR.GetString("Parser.TOKEN.DOT.DOT.DOT") | Parser.TOKEN_QUOTE -> SR.GetString("Parser.TOKEN.QUOTE") | Parser.TOKEN_STAR -> SR.GetString("Parser.TOKEN.STAR") | Parser.TOKEN_HIGH_PRECEDENCE_TYAPP -> SR.GetString("Parser.TOKEN.HIGH.PRECEDENCE.TYAPP") diff --git a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs index efa1b935fc8..f59401625f6 100644 --- a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs +++ b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs @@ -1,4 +1,4 @@ -module internal rec FSharp.Compiler.GraphChecking.FileContentMapping +module internal rec FSharp.Compiler.GraphChecking.FileContentMapping open FSharp.Compiler.Syntax open FSharp.Compiler.SyntaxTreeOps @@ -126,7 +126,8 @@ let visitSynTypeDefn match simpleRepr with | SynTypeDefnSimpleRepr.Union(unionCases = unionCases) -> yield! List.collect visitSynUnionCase unionCases | SynTypeDefnSimpleRepr.Enum(cases = cases) -> yield! List.collect visitSynEnumCase cases - | SynTypeDefnSimpleRepr.Record(recordFields = recordFields) -> yield! List.collect visitSynField recordFields + | SynTypeDefnSimpleRepr.Record(recordFieldsAndSpreads = SynFields recordFields) -> + yield! List.collect visitSynField recordFields // This is only used in the typed tree // The parser doesn't construct this | SynTypeDefnSimpleRepr.General _ @@ -167,7 +168,8 @@ let visitSynTypeDefnSig match simpleRepr with | SynTypeDefnSimpleRepr.Union(unionCases = unionCases) -> yield! List.collect visitSynUnionCase unionCases | SynTypeDefnSimpleRepr.Enum(cases = cases) -> yield! List.collect visitSynEnumCase cases - | SynTypeDefnSimpleRepr.Record(recordFields = recordFields) -> yield! List.collect visitSynField recordFields + | SynTypeDefnSimpleRepr.Record(recordFieldsAndSpreads = SynFields recordFields) -> + yield! List.collect visitSynField recordFields // This is only used in the typed tree // The parser doesn't construct this | SynTypeDefnSimpleRepr.General _ @@ -228,6 +230,8 @@ let visitSynMemberDefn (md: SynMemberDefn) : FileContentEntry list = yield! visitSynAttributes attributes yield! collectFromOption visitSynType typeOpt yield! visitSynExpr synExpr + + | SynMemberDefn.Spread _ -> () ] let visitSynInterfaceImpl (SynInterfaceImpl(interfaceTy = t; bindings = bindings; members = members)) = @@ -378,8 +382,19 @@ let visitSynExpr (e: SynExpr) : FileContentEntry list = | SynExpr.AnonRecd(copyInfo = copyInfo; recordFields = recordFields) -> let continuations = match copyInfo with - | None -> List.map (fun (_, _, e) -> visit e) recordFields - | Some(cp, _) -> visit cp :: List.map (fun (_, _, e) -> visit e) recordFields + | None -> + List.map + (function + | SynExprAnonRecordFieldOrSpread.Field(SynExprAnonRecordField(_, _, e, _), _) + | SynExprAnonRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> visit e) + recordFields + | Some(cp, _) -> + visit cp + :: List.map + (function + | SynExprAnonRecordFieldOrSpread.Field(SynExprAnonRecordField(_, _, e, _), _) + | SynExprAnonRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> visit e) + recordFields Continuation.concatenate continuations continuation | SynExpr.ArrayOrList(exprs = exprs) -> @@ -388,9 +403,12 @@ let visitSynExpr (e: SynExpr) : FileContentEntry list = | SynExpr.Record(baseInfo = baseInfo; copyInfo = copyInfo; recordFields = recordFields) -> let fieldNodes = [ - for SynExprRecordField(fieldName = (si, _); expr = expr) in recordFields do - yield! visitSynLongIdent si - yield! collectFromOption visitSynExpr expr + for fieldOrSpread in recordFields do + match fieldOrSpread with + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(fieldName = (si, _); expr = expr)) -> + yield! visitSynLongIdent si + yield! collectFromOption visitSynExpr expr + | SynExprRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = expr)) -> yield! visitSynExpr expr ] match baseInfo, copyInfo with diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index 512e9b4dca7..5da6034c496 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1814,3 +1814,12 @@ featureAllowLetOrUseBangTypeAnnotationWithoutParens,"Allow let! and use! type an 3877,lexLineDirectiveMappingIsNotUnique,"The file '%s' was also pointed to in a line directive in '%s'. Proper warn directive application may not be possible." 3878,tcAttributeIsNotValidForUnionCaseWithFields,"This attribute is not valid for use on union cases with fields." featureReturnFromFinal,"Support for ReturnFromFinal/YieldFromFinal in computation expressions to enable tailcall optimization when available on the builder." +3879,tcRecordTypeDefinitionSpreadSourceMustBeRecord,"The source type of a spread into a record type definition must itself be a nominal or anonymous record type." +3880,tcRecordExprSpreadSourceMustBeRecord,"The source expression of a spread into a nominal record expression must have a nominal or anonymous record type." +3881,tcAnonRecordExprSpreadSourceMustBeRecord,"The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." +3882,tcRecordTypeDefinitionSpreadFieldShadowsExplicitField,"Spread field '%s' from type '%s' shadows an explicitly declared field with the same name." +3883,tcRecordExprSpreadFieldShadowsExplicitField,"Spread field '%s' shadows an explicitly declared field with the same name." +3884,parsMissingSpreadSrcExpr,"Missing spread source expression after '...'." +3885,parsMissingSpreadSrcTy,"Missing spread source type after '...'." +3886,tcTypeDefinitionIsCyclicThroughSpreads,"This type definition involves a cyclic reference through a spread." +featureRecordSpreads,"record type and expression spreads" diff --git a/src/Compiler/FSStrings.resx b/src/Compiler/FSStrings.resx index 9e471249843..f6990f98a7c 100644 --- a/src/Compiler/FSStrings.resx +++ b/src/Compiler/FSStrings.resx @@ -359,10 +359,10 @@ symbol '>|}' - + symbol '@>|}' or '@@>|}' - + symbol '>|]' @@ -1155,4 +1155,7 @@ No constructors are available for the type '{0}' + + symbol '...' + \ No newline at end of file diff --git a/src/Compiler/Facilities/LanguageFeatures.fs b/src/Compiler/Facilities/LanguageFeatures.fs index 4b032db713f..78eae5dc5f8 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fs +++ b/src/Compiler/Facilities/LanguageFeatures.fs @@ -105,6 +105,7 @@ type LanguageFeature = | ErrorOnInvalidDeclsInTypeDefinitions | AllowTypedLetUseAndBang | ReturnFromFinal + | RecordSpreads /// LanguageVersion management type LanguageVersion(versionText) = @@ -245,6 +246,7 @@ type LanguageVersion(versionText) = // F# preview (still preview in 10.0) LanguageFeature.FromEndSlicing, previewVersion // Unfinished features --- needs work + LanguageFeature.RecordSpreads, previewVersion ] static let defaultLanguageVersion = LanguageVersion("default") @@ -415,6 +417,7 @@ type LanguageVersion(versionText) = | LanguageFeature.ErrorOnInvalidDeclsInTypeDefinitions -> FSComp.SR.featureErrorOnInvalidDeclsInTypeDefinitions () | LanguageFeature.AllowTypedLetUseAndBang -> FSComp.SR.featureAllowLetOrUseBangTypeAnnotationWithoutParens () | LanguageFeature.ReturnFromFinal -> FSComp.SR.featureReturnFromFinal () + | LanguageFeature.RecordSpreads -> FSComp.SR.featureRecordSpreads () /// Get a version string associated with the given feature. static member GetFeatureVersionString feature = diff --git a/src/Compiler/Facilities/LanguageFeatures.fsi b/src/Compiler/Facilities/LanguageFeatures.fsi index 1217b83baf6..3d8e9740829 100644 --- a/src/Compiler/Facilities/LanguageFeatures.fsi +++ b/src/Compiler/Facilities/LanguageFeatures.fsi @@ -96,6 +96,7 @@ type LanguageFeature = | ErrorOnInvalidDeclsInTypeDefinitions | AllowTypedLetUseAndBang | ReturnFromFinal + | RecordSpreads /// LanguageVersion management type LanguageVersion = diff --git a/src/Compiler/Service/FSharpParseFileResults.fs b/src/Compiler/Service/FSharpParseFileResults.fs index 07eb010a767..d8fbf8b5f88 100644 --- a/src/Compiler/Service/FSharpParseFileResults.fs +++ b/src/Compiler/Service/FSharpParseFileResults.fs @@ -633,14 +633,26 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | Some(e, _) -> yield! walkExpr true e | None -> () - yield! walkExprs (fs |> List.choose (fun (SynExprRecordField(expr = e)) -> e)) + yield! + walkExprs ( + fs + |> List.choose (function + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(expr = e)) -> e + | SynExprRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> Some e) + ) | SynExpr.AnonRecd(copyInfo = copyExprOpt; recordFields = fs) -> match copyExprOpt with | Some(e, _) -> yield! walkExpr true e | None -> () - yield! walkExprs (fs |> List.map (fun (_, _, e) -> e)) + yield! + walkExprs ( + fs + |> List.map (function + | SynExprAnonRecordFieldOrSpread.Field(SynExprAnonRecordField(_, _, e, _), _) + | SynExprAnonRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> e) + ) | SynExpr.ObjExpr(argOptions = args; bindings = bs; members = ms; extraImpls = is) -> let bs = unionBindingAndMembers bs ms diff --git a/src/Compiler/Service/ServiceInterfaceStubGenerator.fs b/src/Compiler/Service/ServiceInterfaceStubGenerator.fs index c53ab5d7583..907db3536b2 100644 --- a/src/Compiler/Service/ServiceInterfaceStubGenerator.fs +++ b/src/Compiler/Service/ServiceInterfaceStubGenerator.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace FSharp.Compiler.EditorServices @@ -830,7 +830,8 @@ module InterfaceStubGenerator = | SynMemberDefn.Open _ | SynMemberDefn.ImplicitCtor _ | SynMemberDefn.Inherit _ -> None - | SynMemberDefn.ImplicitInherit(_, expr, _, _, _) -> walkExpr expr + | SynMemberDefn.ImplicitInherit(_, expr, _, _, _) + | SynMemberDefn.Spread(SynExprSpread(expr = expr), _) -> walkExpr expr and walkBinding (SynBinding(expr = expr)) = walkExpr expr @@ -850,7 +851,11 @@ module InterfaceStubGenerator = | SynExpr.ArrayOrList(_, synExprList, _range) -> List.tryPick walkExpr synExprList | SynExpr.Record(_inheritOpt, _copyOpt, fields, _range) -> - List.tryPick (fun (SynExprRecordField(expr = e)) -> Option.bind walkExpr e) fields + List.tryPick + (function + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(expr = e)) -> Option.bind walkExpr e + | SynExprRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> walkExpr e) + fields | SynExpr.New(_, _synType, synExpr, _range) -> walkExpr synExpr diff --git a/src/Compiler/Service/ServiceLexing.fs b/src/Compiler/Service/ServiceLexing.fs index 006f6670208..382ff350f8a 100644 --- a/src/Compiler/Service/ServiceLexing.fs +++ b/src/Compiler/Service/ServiceLexing.fs @@ -63,6 +63,7 @@ module FSharpTokenTag = let DOT = tagOfToken DOT let DOT_DOT = tagOfToken DOT_DOT let DOT_DOT_HAT = tagOfToken DOT_DOT_HAT + let DOT_DOT_DOT = tagOfToken DOT_DOT_DOT let INT32_DOT_DOT = tagOfToken (INT32_DOT_DOT(0, true)) let UNDERSCORE = tagOfToken UNDERSCORE let BAR = tagOfToken BAR @@ -235,7 +236,8 @@ module internal TokenClassifications = | INFIX_AMP_OP _ -> (FSharpTokenColorKind.Operator, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.None) | DOT_DOT - | DOT_DOT_HAT -> (FSharpTokenColorKind.Operator, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.MemberSelect) + | DOT_DOT_HAT + | DOT_DOT_DOT -> (FSharpTokenColorKind.Operator, FSharpTokenCharKind.Operator, FSharpTokenTriggerClass.MemberSelect) | COMMA -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamNext) @@ -1435,6 +1437,7 @@ type FSharpTokenKind = | End | DotDot | DotDotHat + | DotDotDot | BarBar | Upcast | Downcast @@ -1648,6 +1651,7 @@ type FSharpToken = | END -> FSharpTokenKind.End | DOT_DOT -> FSharpTokenKind.DotDot | DOT_DOT_HAT -> FSharpTokenKind.DotDotHat + | DOT_DOT_DOT -> FSharpTokenKind.DotDotDot | BAR_BAR -> FSharpTokenKind.BarBar | UPCAST -> FSharpTokenKind.Upcast | DOWNCAST -> FSharpTokenKind.Downcast diff --git a/src/Compiler/Service/ServiceLexing.fsi b/src/Compiler/Service/ServiceLexing.fsi index 7f2cc207ec0..c5a00e023c5 100755 --- a/src/Compiler/Service/ServiceLexing.fsi +++ b/src/Compiler/Service/ServiceLexing.fsi @@ -177,9 +177,12 @@ module FSharpTokenTag = /// Indicates the token is a `..` val DOT_DOT: int - /// Indicates the token is a `..` + /// Indicates the token is a `..^` val DOT_DOT_HAT: int + /// Indicates the token is a `...` + val DOT_DOT_DOT: int + /// Indicates the token is a `..^` val INT32_DOT_DOT: int @@ -502,6 +505,7 @@ type public FSharpTokenKind = | End | DotDot | DotDotHat + | DotDotDot | BarBar | Upcast | Downcast diff --git a/src/Compiler/Service/ServiceNavigation.fs b/src/Compiler/Service/ServiceNavigation.fs index 25708f87f5b..f630ae8ee6f 100755 --- a/src/Compiler/Service/ServiceNavigation.fs +++ b/src/Compiler/Service/ServiceNavigation.fs @@ -289,7 +289,7 @@ module NavigationImpl = createTypeDecl (baseName, lid, FSharpGlyph.Enum, m, mBody, nested, NavigationEntityKind.Enum, access) ] - | SynTypeDefnSimpleRepr.Record(_, fields, mBody) -> + | SynTypeDefnSimpleRepr.Record(_, SynFields fields, mBody) -> let fields = [ for SynField(idOpt = id; range = m) in fields do @@ -546,7 +546,7 @@ module NavigationImpl = let nested = cases @ topMembers let mBody = bodyRange mBody nested createTypeDecl (baseName, lid, FSharpGlyph.Enum, m, mBody, nested, NavigationEntityKind.Enum, access) - | SynTypeDefnSimpleRepr.Record(_, fields, mBody) -> + | SynTypeDefnSimpleRepr.Record(_, SynFields fields, mBody) -> let fields = [ for SynField(idOpt = id; range = m) in fields do @@ -994,7 +994,7 @@ module NavigateTo = | SynTypeDefnSimpleRepr.Enum(enumCases, _) -> for c in enumCases do addEnumCase c isSig container - | SynTypeDefnSimpleRepr.Record(_, fields, _) -> + | SynTypeDefnSimpleRepr.Record(_, SynFields fields, _) -> for f in fields do // TODO: add specific case for record field? addField f isSig container @@ -1029,7 +1029,8 @@ module NavigateTo = | SynMemberDefn.Open _ | SynMemberDefn.ImplicitInherit _ | SynMemberDefn.Inherit _ - | SynMemberDefn.ImplicitCtor _ -> () + | SynMemberDefn.ImplicitCtor _ + | SynMemberDefn.Spread _ -> () match parsedInput with | ParsedInput.SigFile input -> walkSigFileInput input diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index a3af1b3ba08..7222743e302 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -110,10 +110,10 @@ type SyntaxVisitorBase<'T>() = None /// VisitRecordDefn allows overriding behavior when visiting record definitions (by default do nothing) - abstract VisitRecordDefn: path: SyntaxVisitorPath * fields: SynField list * range -> 'T option + abstract VisitRecordDefn: path: SyntaxVisitorPath * fieldsAndSpreads: SynFieldOrSpread list * range -> 'T option - default _.VisitRecordDefn(path, fields, range) = - ignore (path, fields, range) + default _.VisitRecordDefn(path, fieldsAndSpreads, range) = + ignore (path, fieldsAndSpreads, range) None /// VisitUnionDefn allows overriding behavior when visiting union definitions (by default do nothing) @@ -458,9 +458,13 @@ module SyntaxTraversal = None) | _ -> () - for field, _, x in fields do - yield dive () field.Range (fun () -> visitor.VisitRecordField(path, copyOpt |> Option.map fst, Some field)) - yield dive x x.Range traverseSynExpr + for fieldOrSpread in fields do + match fieldOrSpread with + | SynExprAnonRecordFieldOrSpread.Field(SynExprAnonRecordField(field, _, x, _), _) -> + yield dive () field.Range (fun () -> visitor.VisitRecordField(path, copyOpt |> Option.map fst, Some field)) + yield dive x x.Range traverseSynExpr + | SynExprAnonRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = expr)) -> + yield dive expr expr.Range traverseSynExpr ] |> pick expr @@ -525,57 +529,73 @@ module SyntaxTraversal = let copyOpt = Option.map fst copyOpt - for SynExprRecordField(fieldName = (field, _); expr = e; blockSeparator = sepOpt) in fields do - yield - dive (path, copyOpt, Some field) field.Range (fun r -> - // Treat the caret placed right after the field name (before '=' or a value) as "inside" the field, - // but only if the field does not yet have a value. - // - // Examples (the '$' marks the caret): - // { r with Field1$ } - // { r with - // Field1$ - // } - let isCaretAfterFieldNameWithoutValue = (e.IsNone && posEq pos field.Range.End) - - if rangeContainsPos field.Range pos || isCaretAfterFieldNameWithoutValue then - visitor.VisitRecordField r - else - None) - - let offsideColumn = - match inheritOpt with - | Some(_, _, _, _, inheritRange) -> inheritRange.StartColumn - | None -> field.Range.StartColumn - - match e with - | Some e -> + for fieldOrSpread in fields do + match fieldOrSpread with + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(fieldName = (field, _); expr = e; blockSeparator = sepOpt)) -> yield - dive e e.Range (fun expr -> - // special case: caret is below field binding - // field x = 5 - // $ - if - not (rangeContainsPos e.Range pos) - && sepOpt.IsNone - && pos.Column = offsideColumn - then - visitor.VisitRecordField(path, copyOpt, None) + dive (path, copyOpt, Some field) field.Range (fun r -> + // Treat the caret placed right after the field name (before '=' or a value) as "inside" the field, + // but only if the field does not yet have a value. + // + // Examples (the '$' marks the caret): + // { r with Field1$ } + // { r with + // Field1$ + // } + let isCaretAfterFieldNameWithoutValue = (e.IsNone && posEq pos field.Range.End) + + if rangeContainsPos field.Range pos || isCaretAfterFieldNameWithoutValue then + visitor.VisitRecordField r else - traverseSynExpr expr) - | None -> () - - match sepOpt with - | Some(sep, scPosOpt) -> - yield - dive () sep (fun () -> - // special case: caret is between field bindings - // field1 = 5 - // $ - // field2 = 5 - diveIntoSeparator offsideColumn scPosOpt copyOpt) - | _ -> () - + None) + + let offsideColumn = + match inheritOpt with + | Some(_, _, _, _, inheritRange) -> inheritRange.StartColumn + | None -> field.Range.StartColumn + + match e with + | Some e -> + yield + dive e e.Range (fun expr -> + // special case: caret is below field binding + // field x = 5 + // $ + if + not (rangeContainsPos e.Range pos) + && sepOpt.IsNone + && pos.Column = offsideColumn + then + visitor.VisitRecordField(path, copyOpt, None) + else + traverseSynExpr expr) + | None -> () + + match sepOpt with + | Some(sep, scPosOpt) -> + yield + dive () sep (fun () -> + // special case: caret is between field bindings + // field1 = 5 + // $ + // field2 = 5 + diveIntoSeparator offsideColumn scPosOpt copyOpt) + | None -> () + + | SynExprRecordFieldOrSpread.Spread(SynExprSpread(spreadRange = spreadRange; expr = expr), sepOpt) -> + yield dive expr expr.Range traverseSynExpr + + match sepOpt with + | Some(sep, scPosOpt) -> + yield + dive () sep (fun () -> + // special case: caret is between field bindings + // field1 = 5 + // $ + // field2 = 5 + let offsideColumn = spreadRange.StartColumn + diveIntoSeparator offsideColumn scPosOpt copyOpt) + | None -> () ] |> pick expr @@ -902,10 +922,13 @@ module SyntaxTraversal = ] |> pick tRange tydef - and traverseRecordDefn path fields m = - fields - |> List.tryPick (fun (SynField(attributes = attributes)) -> attributeApplicationDives path attributes |> pick m attributes) - |> Option.orElseWith (fun () -> visitor.VisitRecordDefn(path, fields, m)) + and traverseRecordDefn path fieldsAndSpreads m = + fieldsAndSpreads + |> List.tryPick (function + | SynFieldOrSpread.Field(SynField(attributes = attributes)) -> + attributeApplicationDives path attributes |> pick m attributes + | SynFieldOrSpread.Spread _ -> None) + |> Option.orElseWith (fun () -> visitor.VisitRecordDefn(path, fieldsAndSpreads, m)) and traverseEnumDefn path cases m = cases @@ -986,6 +1009,7 @@ module SyntaxTraversal = | SynMemberDefn.Inherit(None, _, _, _) -> None | SynMemberDefn.ValField _ -> None | SynMemberDefn.NestedType(synTypeDefn, _synAccessOption, _range) -> traverseSynTypeDefn path synTypeDefn + | SynMemberDefn.Spread(SynExprSpread(expr = expr), _) -> traverseSynExpr path expr and traverseSynMatchClause origPath mc = let defaultTraverse mc = @@ -1153,7 +1177,12 @@ module SyntaxTraversal = module SyntaxNode = let (|Attributes|) node = let (|All|) = List.collect - let field (SynField(attributes = attributes)) = attributes + + let fieldOrSpread = + function + | SynFieldOrSpread.Field(SynField(attributes = attributes)) -> attributes + | SynFieldOrSpread.Spread _ -> [] + let unionCase (SynUnionCase(attributes = attributes)) = attributes let enumCase (SynEnumCase(attributes = attributes)) = attributes let typar (SynTyparDecl(attributes = attributes)) = attributes @@ -1179,7 +1208,7 @@ module SyntaxNode = | SyntaxNode.SynModule(SynModuleDecl.Attributes(attributes = attributes)) | SyntaxNode.SynTypeDefn(SynTypeDefn(typeInfo = SynComponentInfo attributes)) | SyntaxNode.SynTypeDefn(SynTypeDefn( - typeRepr = SynTypeDefnRepr.Simple(SynTypeDefnSimpleRepr.Record(recordFields = All field attributes), _))) + typeRepr = SynTypeDefnRepr.Simple(SynTypeDefnSimpleRepr.Record(recordFieldsAndSpreads = All fieldOrSpread attributes), _))) | SyntaxNode.SynTypeDefn(SynTypeDefn( typeRepr = SynTypeDefnRepr.Simple(SynTypeDefnSimpleRepr.Union(unionCases = All unionCase attributes), _))) | SyntaxNode.SynTypeDefn(SynTypeDefn( diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fsi b/src/Compiler/Service/ServiceParseTreeWalk.fsi index ab9e98f6e81..d8a9e142148 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fsi +++ b/src/Compiler/Service/ServiceParseTreeWalk.fsi @@ -101,8 +101,8 @@ type SyntaxVisitorBase<'T> = range: range -> 'T option - abstract VisitRecordDefn: path: SyntaxVisitorPath * fields: SynField list * range -> 'T option - default VisitRecordDefn: path: SyntaxVisitorPath * fields: SynField list * range -> 'T option + abstract VisitRecordDefn: path: SyntaxVisitorPath * fieldsAndSpreads: SynFieldOrSpread list * range -> 'T option + default VisitRecordDefn: path: SyntaxVisitorPath * fieldsAndSpreads: SynFieldOrSpread list * range -> 'T option abstract VisitUnionDefn: path: SyntaxVisitorPath * cases: SynUnionCase list * range -> 'T option default VisitUnionDefn: path: SyntaxVisitorPath * cases: SynUnionCase list * range -> 'T option diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 3065bc7f179..dd12ce9bf0f 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -821,7 +821,9 @@ module ParsedInput = | SynExpr.Record(_, _, fields, r) -> ifPosInRange r (fun _ -> fields - |> List.tryPick (fun (SynExprRecordField(expr = e)) -> e |> Option.bind (walkExprWithKind parentKind))) + |> List.tryPick (function + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(expr = e)) -> e |> Option.bind (walkExprWithKind parentKind) + | SynExprRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> walkExprWithKind parentKind e)) | SynExpr.ObjExpr(objType = ty; bindings = bindings; members = ms; extraImpls = ifaces) -> let bindings = unionBindingAndMembers bindings ms @@ -869,6 +871,8 @@ module ParsedInput = let (SynField(attributes = Attributes attrs; fieldType = t)) = synField List.tryPick walkAttribute attrs |> Option.orElseWith (fun () -> walkType t) + and walkTypeSpread (SynTypeSpread(ty = ty)) = walkType ty + and walkValSig synValSig = let (SynValSig(attributes = Attributes attrs; synType = t)) = synValSig List.tryPick walkAttribute attrs |> Option.orElseWith (fun () -> walkType t) @@ -942,7 +946,12 @@ module ParsedInput = match synTypeDefn with | SynTypeDefnSimpleRepr.Enum(cases, _) -> List.tryPick walkEnumCase cases | SynTypeDefnSimpleRepr.Union(_, cases, _) -> List.tryPick walkUnionCase cases - | SynTypeDefnSimpleRepr.Record(_, fields, _) -> List.tryPick walkField fields + | SynTypeDefnSimpleRepr.Record(_, fields, _) -> + List.tryPick + (function + | SynFieldOrSpread.Field field -> walkField field + | SynFieldOrSpread.Spread spread -> walkTypeSpread spread) + fields | SynTypeDefnSimpleRepr.TypeAbbrev(_, t, _) -> walkType t | _ -> None @@ -1504,7 +1513,9 @@ module ParsedInput = | SyntaxNode.SynExpr(SynExpr.Record(None, _, fields, _)) :: _ -> let isFirstField = match field, fields with - | Some contextLid, SynExprRecordField(fieldName = lid, _) :: _ -> contextLid.Range = lid.Range + | Some contextLid, SynExprRecordFieldOrSpread.Field(SynExprRecordField(fieldName = lid, _)) :: _ -> + contextLid.Range = lid.Range + // TODO: spreads. | _ -> false RecordContext.New(completionPath, isFirstField) @@ -1793,13 +1804,19 @@ module ParsedInput = member _.VisitRecordDefn(_, fields, range) = fields - |> List.tryPick (fun (SynField(idOpt = idOpt; range = fieldRange; fieldType = fieldType)) -> - match idOpt, fieldType with - | Some id, _ when rangeContainsPos id.idRange pos -> - Some(CompletionContext.RecordField(RecordContext.Declaration true)) - | _ when rangeContainsPos fieldRange pos -> Some(CompletionContext.RecordField(RecordContext.Declaration false)) - | _, SynType.FromParseError _ -> Some(CompletionContext.RecordField(RecordContext.Declaration false)) - | _ -> None) + |> List.tryPick (function + | SynFieldOrSpread.Field(SynField(idOpt = idOpt; range = fieldRange; fieldType = fieldType)) -> + match idOpt, fieldType with + | Some id, _ when rangeContainsPos id.idRange pos -> + Some(CompletionContext.RecordField(RecordContext.Declaration true)) + | _ when rangeContainsPos fieldRange pos -> Some(CompletionContext.RecordField(RecordContext.Declaration false)) + | _, SynType.FromParseError _ -> Some(CompletionContext.RecordField(RecordContext.Declaration false)) + | _ -> None + | SynFieldOrSpread.Spread(SynTypeSpread(ty = ty)) -> + if rangeContainsPos ty.Range pos then + Some CompletionContext.Type + else + None) // No completions in a record outside of all fields, except in attributes, which is established earlier in VisitAttributeApplication |> Option.orElseWith (fun _ -> if rangeContainsPos range pos then @@ -2085,9 +2102,11 @@ module ParsedInput = | SynExpr.Record(recordFields = fields) -> fields - |> List.iter (fun (SynExprRecordField(fieldName = (ident, _); expr = e)) -> - addLongIdentWithDots ident - e |> Option.iter walkExpr) + |> List.iter (function + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(fieldName = (ident, _); expr = e)) -> + addLongIdentWithDots ident + e |> Option.iter walkExpr + | SynExprRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> walkExpr e) | SynExpr.Ident ident -> addIdent ident @@ -2210,6 +2229,8 @@ module ParsedInput = List.iter walkAttribute attrs walkType t + and walkTypeSpread (SynTypeSpread(ty = ty)) = walkType ty + and walkValSig (SynValSig(attributes = Attributes attrs; synType = t; arity = SynValInfo(argInfos, argInfo))) = List.iter walkAttribute attrs walkType t @@ -2281,7 +2302,12 @@ module ParsedInput = match typeDefn with | SynTypeDefnSimpleRepr.Enum(cases, _) -> List.iter walkEnumCase cases | SynTypeDefnSimpleRepr.Union(_, cases, _) -> List.iter walkUnionCase cases - | SynTypeDefnSimpleRepr.Record(_, fields, _) -> List.iter walkField fields + | SynTypeDefnSimpleRepr.Record(_, fields, _) -> + List.iter + (function + | SynFieldOrSpread.Field field -> walkField field + | SynFieldOrSpread.Spread spread -> walkTypeSpread spread) + fields | SynTypeDefnSimpleRepr.TypeAbbrev(_, t, _) -> walkType t | _ -> () diff --git a/src/Compiler/Service/ServiceStructure.fs b/src/Compiler/Service/ServiceStructure.fs index c507e82b00b..defc6b38bc3 100644 --- a/src/Compiler/Service/ServiceStructure.fs +++ b/src/Compiler/Service/ServiceStructure.fs @@ -440,7 +440,9 @@ module Structure = | _ -> () recordFields - |> List.choose (fun (SynExprRecordField(expr = e)) -> e) + |> List.choose (function + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(expr = e)) -> e + | SynExprRecordFieldOrSpread.Spread(spread = SynExprSpread(expr = e)) -> Some e) |> List.iter parseExpr // exclude the opening `{` and closing `}` of the record from collapsing let m = Range.modBoth 1 1 r @@ -607,7 +609,7 @@ module Structure = rcheck Scope.EnumCase Collapse.Below cr cr parseAttributes attrs - | SynTypeDefnSimpleRepr.Record(_, fields, rr) -> + | SynTypeDefnSimpleRepr.Record(_, SynFields fields, rr) -> rcheck Scope.RecordDefn Collapse.Same rr rr for SynField(attributes = attrs; range = fr) in fields do diff --git a/src/Compiler/Service/ServiceXmlDocParser.fs b/src/Compiler/Service/ServiceXmlDocParser.fs index f320606cb33..934c44731ba 100644 --- a/src/Compiler/Service/ServiceXmlDocParser.fs +++ b/src/Compiler/Service/ServiceXmlDocParser.fs @@ -205,7 +205,8 @@ module XmlDocParsing = | SynMemberDefn.ImplicitInherit _ | SynMemberDefn.Inherit _ | SynMemberDefn.ValField _ - | SynMemberDefn.LetBindings _ -> () + | SynMemberDefn.LetBindings _ + | SynMemberDefn.Spread _ -> () ] and getXmlDocablesInput input = diff --git a/src/Compiler/Service/SynExpr.fs b/src/Compiler/Service/SynExpr.fs index 9fd1b3a888a..aed93173205 100644 --- a/src/Compiler/Service/SynExpr.fs +++ b/src/Compiler/Service/SynExpr.fs @@ -1111,8 +1111,9 @@ module SynExpr = let rec loop recordFields = match recordFields with | [] -> false - | SynExprRecordField(expr = Some(SynExpr.Paren(expr = Is inner)); blockSeparator = Some _) :: SynExprRecordField( - fieldName = SynLongIdent(id = id :: _), _) :: _ -> problematic inner.Range id.idRange + | SynExprRecordFieldOrSpread.Field(SynExprRecordField( + expr = Some(SynExpr.Paren(expr = Is inner)); blockSeparator = Some _)) :: SynExprRecordFieldOrSpread.Field(SynExprRecordField( + fieldName = SynLongIdent(id = id :: _), _)) :: _ -> problematic inner.Range id.idRange | _ :: recordFields -> loop recordFields loop recordFields @@ -1121,8 +1122,8 @@ module SynExpr = let rec loop recordFields = match recordFields with | [] -> false - | (_, Some _blockSeparator, SynExpr.Paren(expr = Is inner)) :: (SynLongIdent(id = id :: _), _, _) :: _ -> - problematic inner.Range id.idRange + | SynExprAnonRecordFieldOrSpread.Field(SynExprAnonRecordField(_, Some _equalsRange, SynExpr.Paren(expr = Is inner), _), + _) :: next :: _ -> problematic inner.Range next.Range | _ :: recordFields -> loop recordFields loop recordFields diff --git a/src/Compiler/SyntaxTree/LexFilter.fs b/src/Compiler/SyntaxTree/LexFilter.fs index ac068f3acd0..99eb5b12aa4 100644 --- a/src/Compiler/SyntaxTree/LexFilter.fs +++ b/src/Compiler/SyntaxTree/LexFilter.fs @@ -2357,6 +2357,7 @@ type LexFilterImpl ( match lookaheadTokenTup.Token with | RBRACE _ | IDENT _ + | DOT_DOT_DOT // The next clause detects the access annotations after the 'with' in: // member x.PublicGetSetProperty // with public get i = "Ralf" @@ -2397,18 +2398,26 @@ type LexFilterImpl ( // // with x = ... // + // or + // + // with ...spreadSrc + // // Which can only be part of // // { r with x = ... } // + // or + // + // { r with ...spreadSrc } + // // and in this case push a CtxtSeqBlock to cover the sequence - let isFollowedByLongIdentEquals = + let isFollowedByLongIdentEqualsOrDotDotDot = let tokenTup = popNextTokenTup() - let res = isLongIdentEquals tokenTup.Token + let res = isLongIdentEquals tokenTup.Token || match tokenTup.Token with DOT_DOT_DOT -> true | _ -> false delayToken tokenTup res - if isFollowedByLongIdentEquals then + if isFollowedByLongIdentEqualsOrDotDotDot then pushCtxtSeqBlock tokenTup NoAddBlockEnd returnToken tokenLexbufState OWITH diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fs b/src/Compiler/SyntaxTree/ParseHelpers.fs index 9df29ddbf79..1a41ebe7416 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fs +++ b/src/Compiler/SyntaxTree/ParseHelpers.fs @@ -722,13 +722,28 @@ let rebindRanges first fields lastSep = | Some mEq -> unionRanges lidwd.Range mEq | None -> lidwd.Range - let rec run (name, mEquals, value: SynExpr option) l acc = - let lidwd, _ = name - let fieldRange = calculateFieldRange lidwd mEquals value - - match l with - | [] -> List.rev (SynExprRecordField(name, mEquals, value, fieldRange, lastSep) :: acc) - | (f, m) :: xs -> run f xs (SynExprRecordField(name, mEquals, value, fieldRange, m) :: acc) + let rec run fieldOrSpread l acc = + match fieldOrSpread with + | RecordBinding.Field((lidwd, _ as name), mEquals, value) -> + let fieldRange = calculateFieldRange lidwd mEquals value + + match l with + | [] -> + List.rev ( + SynExprRecordFieldOrSpread.Field(SynExprRecordField(name, mEquals, value, fieldRange, lastSep)) + :: acc + ) + | (f, m) :: xs -> + run + f + xs + (SynExprRecordFieldOrSpread.Field(SynExprRecordField(name, mEquals, value, fieldRange, m)) + :: acc) + + | RecordBinding.Spread spread -> + match l with + | [] -> List.rev (SynExprRecordFieldOrSpread.Spread(spread, lastSep) :: acc) + | (f, _) :: xs -> run f xs (SynExprRecordFieldOrSpread.Spread(spread, lastSep) :: acc) run first fields [] diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fsi b/src/Compiler/SyntaxTree/ParseHelpers.fsi index c8c2ece5d44..a12827094fe 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fsi +++ b/src/Compiler/SyntaxTree/ParseHelpers.fsi @@ -165,10 +165,10 @@ val exprFromParseError: e: SynExpr -> SynExpr val patFromParseError: e: SynPat -> SynPat val rebindRanges: - first: (RecordFieldName * range option * SynExpr option) -> - fields: ((RecordFieldName * range option * SynExpr option) * BlockSeparator option) list -> + first: RecordBinding -> + fields: (RecordBinding * BlockSeparator option) list -> lastSep: BlockSeparator option -> - SynExprRecordField list + SynExprRecordFieldOrSpread list val mkUnderscoreRecdField: m: range -> SynLongIdent * bool diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 0e621c0be34..9637100948a 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -310,6 +310,11 @@ type BlockSeparator = range * pos option type RecordFieldName = SynLongIdent * bool +[] +type RecordBinding = + | Field of name: RecordFieldName * equalsRange: range option * declExpr: SynExpr option + | Spread of spread: SynExprSpread + type ExprAtomicFlag = | Atomic = 0 | NonAtomic = 1 @@ -534,7 +539,7 @@ type SynExpr = | AnonRecd of isStruct: bool * copyInfo: (SynExpr * BlockSeparator) option * - recordFields: (SynLongIdent * range option * SynExpr) list * + recordFields: SynExprAnonRecordFieldOrSpread list * range: range * trivia: SynExprAnonRecdTrivia @@ -543,7 +548,7 @@ type SynExpr = | Record of baseInfo: (SynType * SynExpr * range * BlockSeparator option * range) option * copyInfo: (SynExpr * BlockSeparator) option * - recordFields: SynExprRecordField list * + recordFields: SynExprRecordFieldOrSpread list * range: range | New of isProtected: bool * targetType: SynType * expr: SynExpr * range: range @@ -864,6 +869,12 @@ type SynExpr = | SynExpr.ArbitraryAfterError _ -> true | _ -> false +[] +type SynTypeSpread = SynTypeSpread of spreadRange: range * ty: SynType * range: range + +[] +type SynExprSpread = SynExprSpread of spreadRange: range * expr: SynExpr * range: range + [] type SynExprRecordField = | SynExprRecordField of @@ -873,6 +884,24 @@ type SynExprRecordField = range: range * blockSeparator: BlockSeparator option +[] +type SynExprRecordFieldOrSpread = + | Field of field: SynExprRecordField + | Spread of spread: SynExprSpread * blockSeparator: BlockSeparator option + +[] +type SynExprAnonRecordField = SynExprAnonRecordField of fieldName: SynLongIdent * equalsRange: range option * expr: SynExpr * range: range + +[] +type SynExprAnonRecordFieldOrSpread = + | Field of field: SynExprAnonRecordField * blockSeparator: BlockSeparator option + | Spread of spread: SynExprSpread * blockSeparator: BlockSeparator option + + member this.Range = + match this with + | SynExprAnonRecordFieldOrSpread.Field(SynExprAnonRecordField(_, _, _, m), _) + | SynExprAnonRecordFieldOrSpread.Spread(SynExprSpread(_, _, m), _) -> m + [] type SynInterpolatedStringPart = | String of value: string * range: range @@ -1220,7 +1249,7 @@ type SynTypeDefnSimpleRepr = | Enum of cases: SynEnumCase list * range: range - | Record of accessibility: SynAccess option * recordFields: SynField list * range: range + | Record of accessibility: SynAccess option * recordFieldsAndSpreads: SynFieldOrSpread list * range: range | General of kind: SynTypeDefnKind * @@ -1253,6 +1282,11 @@ type SynTypeDefnSimpleRepr = | None(range = m) -> m | Exception t -> t.Range +[] +type SynFieldOrSpread = + | Field of field: SynField + | Spread of spread: SynTypeSpread + [] type SynEnumCase = @@ -1535,6 +1569,8 @@ type SynMemberDefn = range: range * trivia: SynMemberDefnAutoPropertyTrivia + | Spread of spread: SynExprSpread * range: range + member d.Range = match d with | SynMemberDefn.Member(range = m) @@ -1548,7 +1584,8 @@ type SynMemberDefn = | SynMemberDefn.Inherit(range = m) | SynMemberDefn.ValField(range = m) | SynMemberDefn.AutoProperty(range = m) - | SynMemberDefn.NestedType(range = m) -> m + | SynMemberDefn.NestedType(range = m) + | SynMemberDefn.Spread(range = m) -> m type SynMemberDefns = SynMemberDefn list diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index 16745c78736..be5785c497f 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -362,6 +362,12 @@ type BlockSeparator = range * pos option /// correct and can be used in name resolution. type RecordFieldName = SynLongIdent * bool +/// Represents either a record field name or a spread expression. +[] +type RecordBinding = + | Field of name: RecordFieldName * equalsRange: range option * declExpr: SynExpr option + | Spread of spread: SynExprSpread + /// Indicates if an expression is an atomic expression. /// /// An atomic expression has no whitespace unless enclosed in parentheses, e.g. @@ -591,7 +597,7 @@ type SynExpr = | AnonRecd of isStruct: bool * copyInfo: (SynExpr * BlockSeparator) option * - recordFields: (SynLongIdent * range option * SynExpr) list * + recordFields: SynExprAnonRecordFieldOrSpread list * range: range * trivia: SynExprAnonRecdTrivia @@ -605,7 +611,7 @@ type SynExpr = | Record of baseInfo: (SynType * SynExpr * range * BlockSeparator option * range) option * copyInfo: (SynExpr * BlockSeparator) option * - recordFields: SynExprRecordField list * + recordFields: SynExprRecordFieldOrSpread list * range: range /// F# syntax: new C(...) @@ -970,6 +976,18 @@ type SynExpr = /// Indicates if this expression arises from error recovery member IsArbExprAndThusAlreadyReportedError: bool +/// Represents a type spread in a type definition. +/// +/// type Ty2 = { ...Ty1 } +[] +type SynTypeSpread = SynTypeSpread of spreadRange: range * ty: SynType * range: range + +/// Represents a spread expression. +/// +/// ...expr +[] +type SynExprSpread = SynExprSpread of spreadRange: range * expr: SynExpr * range: range + [] type SynExprRecordField = | SynExprRecordField of @@ -979,6 +997,28 @@ type SynExprRecordField = range: range * blockSeparator: BlockSeparator option +/// Represents either a field declaration or a spread expression in a nominal record construction expression. +/// +/// let r = { A = 3; ...b; C = true } +[] +type SynExprRecordFieldOrSpread = + | Field of field: SynExprRecordField + | Spread of spread: SynExprSpread * blockSeparator: BlockSeparator option + +[] +type SynExprAnonRecordField = + | SynExprAnonRecordField of fieldName: SynLongIdent * equalsRange: range option * expr: SynExpr * range: range + +/// Represents either a field declaration or a spread expression in an anonymous record construction expression. +/// +/// let r = {| A = 3; ...b; C = true |} +[] +type SynExprAnonRecordFieldOrSpread = + | Field of field: SynExprAnonRecordField * blockSeparator: BlockSeparator option + | Spread of spread: SynExprSpread * blockSeparator: BlockSeparator option + + member Range: range + [] type SynInterpolatedStringPart = | String of value: string * range: range @@ -1362,7 +1402,7 @@ type SynTypeDefnSimpleRepr = | Enum of cases: SynEnumCase list * range: range /// A record type definition, type X = { A: int; B: int } - | Record of accessibility: SynAccess option * recordFields: SynField list * range: range + | Record of accessibility: SynAccess option * recordFieldsAndSpreads: SynFieldOrSpread list * range: range /// An object oriented type definition. This is not a parse-tree form, but represents the core /// type representation which the type checker splits out from the "ObjectModel" cases of type definitions. @@ -1395,6 +1435,12 @@ type SynTypeDefnSimpleRepr = /// Gets the syntax range of this construct member Range: range +/// Represents either a field declaration or a type spread. +[] +type SynFieldOrSpread = + | Field of field: SynField + | Spread of spread: SynTypeSpread + /// Represents the syntax tree for one case in an enum definition. [] type SynEnumCase = @@ -1707,6 +1753,8 @@ type SynMemberDefn = range: range * trivia: SynMemberDefnAutoPropertyTrivia + | Spread of spread: SynExprSpread * range: range + /// Gets the syntax range of this construct member Range: range diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index 29b3b6a1ff6..1988dba621f 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -922,13 +922,24 @@ let rec synExprContainsError inpExpr = (match origExpr with | Some(e, _) -> walkExpr e | None -> false) - || walkExprs (List.map (fun (_, _, e) -> e) flds) + || walkExprs ( + List.choose + (function + | SynExprAnonRecordFieldOrSpread.Field(SynExprAnonRecordField(_, _, e, _), _) -> Some e + | SynExprAnonRecordFieldOrSpread.Spread _ -> None (* TODO. *) ) + flds + ) | SynExpr.Record(_, origExpr, fs, _) -> (match origExpr with | Some(e, _) -> walkExpr e | None -> false) - || (let flds = fs |> List.choose (fun (SynExprRecordField(expr = v)) -> v) + || (let flds = + fs + |> List.choose (function + | SynExprRecordFieldOrSpread.Field(SynExprRecordField(expr = v)) -> v + | SynExprRecordFieldOrSpread.Spread(SynExprSpread(expr = e), _) -> Some e) + walkExprs flds) | SynExpr.ObjExpr(bindings = bs; members = ms; extraImpls = is) -> @@ -1202,3 +1213,15 @@ let addEmptyMatchClause (mBar1: range) (mBar2: range) (clauses: SynMatchClause l | SynMatchClause(pat, whenExpr, resultExpr, range, debugPoint, trivia) :: restClauses -> SynMatchClause(addOrPat pat, whenExpr, resultExpr, range, debugPoint, trivia) :: restClauses + +let (|SynFields|) (synFieldsAndSpreads: SynFieldOrSpread list) = + synFieldsAndSpreads + |> List.choose (function + | SynFieldOrSpread.Field field -> Some field + | SynFieldOrSpread.Spread _ -> None) + +let (|SynSpreads|) (synFieldsAndSpreads: SynFieldOrSpread list) = + synFieldsAndSpreads + |> List.choose (function + | SynFieldOrSpread.Field _ -> None + | SynFieldOrSpread.Spread spread -> Some spread) diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi b/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi index 5e3d2ff13e3..703782d75b3 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fsi @@ -378,3 +378,7 @@ val getGetterSetterAccess: SynValSigAccess -> SynMemberKind -> LanguageVersion - /// Adds SynPat.Or pattern for unfinished empty clause above val addEmptyMatchClause: mBar1: range -> mBar2: range -> clauses: SynMatchClause list -> SynMatchClause list + +val (|SynFields|): synFieldsAndSpreads: SynFieldOrSpread list -> SynField list + +val (|SynSpreads|): synFieldsAndSpreads: SynFieldOrSpread list -> SynTypeSpread list diff --git a/src/Compiler/TypedTree/TypedTreeOps.fs b/src/Compiler/TypedTree/TypedTreeOps.fs index b50c5153886..d4de889f325 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.fs @@ -7784,6 +7784,7 @@ let mkRecordExpr g (lnk, tcref, tinst, unsortedRecdFields: RecdFieldRef list, un let core = Expr.Op (TOp.Recd (lnk, tcref), tinst, sortedArgExprs, m) mkLetsBind m unsortedArgBinds core +// TODO: We'll have already sorted things while keeping track of the original order, so we _could_ simplify this. let mkAnonRecd (_g: TcGlobals) m (anonInfo: AnonRecdTypeInfo) (unsortedIds: Ident[]) (unsortedFieldExprs: Expr list) unsortedArgTys = let sortedRecdFields = unsortedFieldExprs |> List.indexed |> Array.ofList |> Array.sortBy (fun (i,_) -> unsortedIds[i].idText) let sortedArgTys = unsortedArgTys |> List.indexed |> List.sortBy (fun (i,_) -> unsortedIds[i].idText) |> List.map snd diff --git a/src/Compiler/lex.fsl b/src/Compiler/lex.fsl index 1f905bc049a..3423ef865b6 100644 --- a/src/Compiler/lex.fsl +++ b/src/Compiler/lex.fsl @@ -868,6 +868,8 @@ rule token (args: LexArgs) (skip: bool) = parse | "..^" { DOT_DOT_HAT } + | "..." { DOT_DOT_DOT } + | "." { DOT } | ":" { COLON } diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 5abe2d82a07..d34ebd296a8 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -80,7 +80,7 @@ let parse_error_rich = Some(fun (ctxt: ParseErrorContext<_>) -> %token PERCENT_OP BINDER %token LQUOTE RQUOTE RQUOTE_DOT RQUOTE_BAR_RBRACE %token BAR_BAR UPCAST DOWNCAST NULL RESERVED MODULE NAMESPACE DELEGATE CONSTRAINT BASE -%token AND AS ASSERT OASSERT ASR BEGIN DO DONE DOWNTO ELSE ELIF END DOT_DOT DOT_DOT_HAT +%token AND AS ASSERT OASSERT ASR BEGIN DO DONE DOWNTO ELSE ELIF END DOT_DOT_DOT DOT_DOT DOT_DOT_HAT %token EXCEPTION FALSE FOR FUN FUNCTION IF IN JOIN_IN FINALLY DO_BANG %token LAZY OLAZY MATCH MATCH_BANG MUTABLE NEW OF %token OPEN OR REC THEN TO TRUE TRY TYPE VAL INLINE INTERFACE INSTANCE CONST @@ -2160,7 +2160,6 @@ classDefnMember: let leadingKeyword = SynTypeDefnLeadingKeyword.StaticType(rhs parseState 3, rhs parseState 4) [ SynMemberDefn.NestedType($5 leadingKeyword, None, rhs2 parseState 1 5) ] } - /* A 'val' definition in an object type definition */ valDefnDecl: | VAL opt_mutable opt_access ident COLON typ @@ -2948,7 +2947,8 @@ unionCaseReprElement: unionCaseRepr: | braceFieldDeclList { errorR(Deprecated(FSComp.SR.parsConsiderUsingSeparateRecordType(), lhs parseState)) - $1, rhs parseState 1 } + let fields = $1 |> List.choose (function SynFieldOrSpread.Field field -> Some field | _ -> None) + fields, rhs parseState 1 } | unionCaseReprElements { $1 } @@ -2969,7 +2969,16 @@ recdFieldDecl: let (SynField (a, b, c, d, e, xmlDoc, vis, mWhole, trivia)) = fld if Option.isSome vis then errorR (Error (FSComp.SR.parsRecordFieldsCannotHaveVisibilityDeclarations (), rhs parseState 2)) let mWhole = unionRangeWithXmlDoc xmlDoc mWhole - SynField (a, b, c, d, e, xmlDoc, None, mWhole, trivia) } + SynFieldOrSpread.Field (SynField (a, b, c, d, e, xmlDoc, None, mWhole, trivia)) } + + | DOT_DOT_DOT typ + { let m = rhs2 parseState 1 2 + SynFieldOrSpread.Spread (SynTypeSpread (rhs parseState 1, $2, m)) } + + | DOT_DOT_DOT + { let m = rhs parseState 1 + reportParseErrorAt m (FSComp.SR.parsMissingSpreadSrcTy ()) + SynFieldOrSpread.Spread (SynTypeSpread (m, SynType.FromParseError m, m)) } /* Part of a field or val declaration in a record type or object type */ fieldDecl: @@ -5668,8 +5677,11 @@ recdExpr: { let arg = match $4 with None -> mkSynUnit (lhs parseState) | Some e -> e let l = List.rev $5 let dummyField = mkRecdField (SynLongIdent([], [], [])) // dummy identifier, it will be discarded - let l = rebindRanges (dummyField, None, None) l $6 - let (SynExprRecordField(_, _, _, _, inheritsSep)) = List.head l + let l = rebindRanges (RecordBinding.Field (dummyField, None, None)) l $6 + let inheritsSep = + match List.head l with + | SynExprRecordFieldOrSpread.Field (SynExprRecordField(_, _, _, _, inheritsSep)) -> inheritsSep + | _ -> None let bindings = List.tail l (Some($2, arg, rhs2 parseState 2 4, inheritsSep, rhs parseState 1), None, bindings) } @@ -5684,7 +5696,7 @@ recdExprCore: let f = mkRecdField f let mEquals = rhs parseState 2 let l = List.rev $4 - let l = rebindRanges (f, Some mEquals, Some $3) l $5 + let l = rebindRanges (RecordBinding.Field (f, Some mEquals, Some $3)) l $5 (None, l) | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsFieldBinding()) } @@ -5693,7 +5705,7 @@ recdExprCore: | LongOrSingleIdent(false, (SynLongIdent _ as f), None, m) -> let f = mkRecdField f let mEquals = rhs parseState 2 - let l = rebindRanges (f, Some mEquals, None) [] None + let l = rebindRanges (RecordBinding.Field (f, Some mEquals, None)) [] None None, l | _ -> raiseParseErrorAt (rhs parseState 2) (FSComp.SR.parsFieldBinding ()) } @@ -5702,6 +5714,19 @@ recdExprCore: reportParseErrorAt mExpr (FSComp.SR.parsFieldBinding ()) Some($1, (mExpr.EndRange, None)), [] } + | DOT_DOT_DOT declExprBlock recdExprBindings opt_seps_block + { let mSpread = rhs parseState 1 + let m = rhs2 parseState 1 2 + let l = List.rev $3 + let l = rebindRanges (RecordBinding.Spread (SynExprSpread (mSpread, $2, m))) l $4 + None, l } + + | DOT_DOT_DOT + { let mSpread = rhs parseState 1 + let m = mSpread + reportParseErrorAt m (FSComp.SR.parsMissingSpreadSrcExpr ()) + None, rebindRanges (RecordBinding.Spread (SynExprSpread (mSpread, arbExpr ("spreadSrcExpr", m), m))) [] None } + /* handles cases when identifier can start from the underscore */ @@ -5711,7 +5736,7 @@ recdExprCore: reportParseErrorAt m (FSComp.SR.parsUnderscoreInvalidFieldName()) reportParseErrorAt m (FSComp.SR.parsFieldBinding()) let f = mkUnderscoreRecdField m - (None, [ SynExprRecordField(f, None, None, m, None) ]) } + (None, [ SynExprRecordFieldOrSpread.Field (SynExprRecordField(f, None, None, m, None)) ]) } | UNDERSCORE EQUALS { let m = rhs parseState 1 @@ -5720,14 +5745,14 @@ 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, [ SynExprRecordFieldOrSpread.Field (SynExprRecordField(f, Some mEquals, None, (rhs2 parseState 1 2), None)) ]) } | UNDERSCORE EQUALS declExprBlock recdExprBindings opt_seps_block { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnderscoreInvalidFieldName()) let f = mkUnderscoreRecdField (rhs parseState 1) let mEquals = rhs parseState 2 let l = List.rev $4 - let l = rebindRanges (f, Some mEquals, Some $3) l $5 + let l = rebindRanges (RecordBinding.Field (f, Some mEquals, Some $3)) l $5 (None, l) } /* handles case like {x with} */ @@ -5784,27 +5809,38 @@ recdExprBindings: { [] } recdBinding: + | DOT_DOT_DOT declExprBlock + { let mSpread = rhs parseState 1 + let m = rhs2 parseState 1 2 + RecordBinding.Spread (SynExprSpread (mSpread, $2, m)) } + | pathOrUnderscore EQUALS declExprBlock { let mEquals = rhs parseState 2 - ($1, Some mEquals, Some $3) } + RecordBinding.Field ($1, Some mEquals, Some $3) } | pathOrUnderscore EQUALS { let mEquals = rhs parseState 2 reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) - ($1, Some mEquals, None) } + RecordBinding.Field ($1, Some mEquals, None) } | pathOrUnderscore EQUALS ends_coming_soon_or_recover { let mEquals = rhs parseState 2 reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) - ($1, Some mEquals, None) } + RecordBinding.Field ($1, Some mEquals, None) } | pathOrUnderscore { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) - ($1, None, None) } + RecordBinding.Field ($1, None, None) } | pathOrUnderscore ends_coming_soon_or_recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsFieldBinding()) - ($1, None, None) } + RecordBinding.Field ($1, None, None) } + + | DOT_DOT_DOT + { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsMissingSpreadSrcExpr ()) + let mSpread = rhs parseState 1 + let m = mSpread + RecordBinding.Spread (SynExprSpread (mSpread, arbExpr ("spreadSrcExpr", m), m)) } /* There is a minor conflict between seq { new ty() } // sequence expression with one very odd 'action' expression @@ -5905,9 +5941,14 @@ braceBarExprCore: { let orig, flds = $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 - | SynExprRecordField((SynLongIdent([ _id ], _, _) as synLongIdent, _), mEquals, Some e, _, _) -> Some(synLongIdent, mEquals, e) // record construction, long identifier not valid - | SynExprRecordField((synLongIdent, _), mEquals, None, _, _) -> Some(synLongIdent, mEquals, arbExpr ("anonField", synLongIdent.Range)) + | SynExprRecordFieldOrSpread.Field (SynExprRecordField((synLongIdent, _), mEquals, Some e, m, sep)) when orig.IsSome -> + Some (SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (synLongIdent, mEquals, e, m), sep)) // copy-and-update, long identifier signifies nesting + | SynExprRecordFieldOrSpread.Field (SynExprRecordField((SynLongIdent([ _id ], _, _) as synLongIdent, _), mEquals, Some e, m, sep)) -> + Some (SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (synLongIdent, mEquals, e, m), sep)) // record construction, long identifier not valid + | SynExprRecordFieldOrSpread.Field (SynExprRecordField((synLongIdent, _), mEquals, None, m, sep)) -> + Some (SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (synLongIdent, mEquals, arbExpr ("anonField", synLongIdent.Range), m), sep)) + | SynExprRecordFieldOrSpread.Spread (spread, sep) -> + Some (SynExprAnonRecordFieldOrSpread.Spread (spread, sep)) | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) let mLeftBrace = rhs parseState 1 let mRightBrace = rhs parseState 3 @@ -5920,8 +5961,12 @@ braceBarExprCore: let orig, flds = $2 let flds = flds |> List.map (function - | SynExprRecordField((synLongIdent, _), mEquals, Some e, _, _) -> (synLongIdent, mEquals, e) - | SynExprRecordField((synLongIdent, _), mEquals, None, _, _) -> (synLongIdent, mEquals, arbExpr ("anonField", synLongIdent.Range))) + | SynExprRecordFieldOrSpread.Field (SynExprRecordField((synLongIdent, _), mEquals, Some e, m, sep)) -> + SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (synLongIdent, mEquals, e, m), sep) + | SynExprRecordFieldOrSpread.Field (SynExprRecordField((synLongIdent, _), mEquals, None, m, sep)) -> + SynExprAnonRecordFieldOrSpread.Field (SynExprAnonRecordField (synLongIdent, mEquals, arbExpr ("anonField", synLongIdent.Range), m), sep) + | SynExprRecordFieldOrSpread.Spread (spread, sep) -> + SynExprAnonRecordFieldOrSpread.Spread (spread, sep)) let mLeftBrace = rhs parseState 1 let mExpr = rhs parseState 2 (fun (mStruct: range option) -> @@ -6535,7 +6580,7 @@ atomTypeOrAnonRecdType: { let flds, isStruct = $1 let flds2 = flds |> List.choose (function - | (SynField([], false, Some id, ty, false, _xmldoc, None, _m, _trivia)) -> Some(id, ty) + | SynFieldOrSpread.Field (SynField([], false, Some id, ty, false, _xmldoc, None, _m, _trivia)) -> Some(id, ty) | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) SynType.AnonRecd(isStruct, flds2, rhs parseState 1) } diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index 244be90e142..3347050b625 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -582,6 +582,11 @@ vypsat literály libovolné velikosti + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells informační zprávy související s referenčními buňkami @@ -1207,6 +1212,16 @@ Očekává se text člena + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Chybí název případu sjednocení @@ -1437,6 +1452,11 @@ Pole {0} se v tomto anonymním typu záznamu vyskytuje vícekrát. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods Konstrukt „let! ... and! ...“ se dá použít jen v případě, že tvůrce výpočetních výrazů definuje buď metodu „{0}“, nebo vhodné metody „MergeSource“ a „Bind“. @@ -1797,6 +1837,11 @@ Vlastnost nesmí určovat volitelné argumenty, in, out, ParamArray, CallerInfo nebo Quote. + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index d1b1782d093..36031b953b1 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -582,6 +582,11 @@ Literale beliebiger Größe auflisten + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells Informationsmeldungen im Zusammenhang mit Bezugszellen @@ -1207,6 +1212,16 @@ Membertext wird erwartet + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Fehlender Union-Fallname @@ -1437,6 +1452,11 @@ Das Feld "{0}" ist in diesem anonymen Datensatztyp mehrmals vorhanden. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods Das Konstrukt "let! ... and! ..." kann nur verwendet werden, wenn der Berechnungsausdrucks-Generator entweder eine {0}-Methode oder geeignete MergeSources- und Bind-Methoden definiert. @@ -1797,6 +1837,11 @@ Ein Merkmal darf keine Argumente für „optional“, „in“, „out“, „ParamArray“", „CallerInfo“ oder „Quote“ angeben. + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index cd311cc7fc5..8850b1ae4b5 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -582,6 +582,11 @@ enumerar literales de cualquier tamaño + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells mensajes informativos relacionados con las celdas de referencia @@ -1207,6 +1212,16 @@ Se espera el cuerpo del miembro + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Falta el nombre del caso de unión @@ -1437,6 +1452,11 @@ El campo "{0}" aparece varias veces en este tipo de registro anónimo. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods La construcción "let! ... and! ..." solo se puede usar si el generador de expresiones de cálculo define un método "{0}" o bien los métodos "MergeSources" y "Bind" adecuados. @@ -1797,6 +1837,11 @@ Un rasgo no puede especificar argumentos opcionales, in, out, ParamArray, CallerInfo o Quote + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index e05e9ecdf6c..52965ae5479 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -582,6 +582,11 @@ répertorier les littéraux de n’importe quelle taille + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells messages d’information liés aux cellules de référence @@ -1207,6 +1212,16 @@ Comité membre attendu + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Nom du cas syndical manquant @@ -1437,6 +1452,11 @@ Le champ '{0}' apparaît plusieurs fois dans ce type d'enregistrement anonyme. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods Le « laissez ! » ... et! ...' ne peut être utilisée que si le générateur d'expression de calcul définit soit une méthode '{0}', soit des méthodes 'MergeSources' et 'Bind' appropriées. @@ -1797,6 +1837,11 @@ Une caractéristique ne peut pas spécifier d’arguments facultatifs, in, out, ParamArray, CallerInfo ou Quote + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index a25fd816046..4a5778d8652 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -582,6 +582,11 @@ elenca valori letterali di qualsiasi dimensione + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells messaggi informativi relativi alle celle di riferimento @@ -1207,6 +1212,16 @@ Previsto corpo del membro + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Nome case di unione mancante @@ -1437,6 +1452,11 @@ Il campo '{0}' viene visualizzato più volte in questo tipo di record anonimo. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods È possibile usare il costrutto "let! ... and! ..." solo se il generatore di espressioni di calcolo definisce un metodo "{0}" o metodi "MergeSource" e "Bind" appropriati @@ -1797,6 +1837,11 @@ Un tratto non può specificare argomenti optional, in, out, ParamArray, CallerInfo o Quote + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 87b7d40df1e..0e91af4ab77 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -582,6 +582,11 @@ 任意のサイズのリテラルを一覧表示する + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells 参照セルに関連する情報メッセージ @@ -1207,6 +1212,16 @@ メンバー本体が必要です + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name 共用体のケース名がありません @@ -1437,6 +1452,11 @@ この匿名レコードの種類に、フィールド '{0}' が複数回出現します。 + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods 'let! ... and! ...' コンストラクトは、コンピュテーション式ビルダーが '{0}' メソッドまたは適切な 'MergeSource' および 'Bind' メソッドのいずれかを定義している場合にのみ使用できます @@ -1797,6 +1837,11 @@ 特性では、オプションの、in 引数、out 引数、ParamArray 引数、CallerInfo 引数、または Quote 引数を指定することはできません + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index f2fe6e20f97..f1ce5620c0f 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -582,6 +582,11 @@ 모든 크기의 목록 리터럴 + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells 참조 셀과 관련된 정보 메시지 @@ -1207,6 +1212,16 @@ 멤버 본문이 필요한 경우 + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name 공용 구조체 대/소문자 이름이 없습니다. @@ -1437,6 +1452,11 @@ '{0}' 필드가 이 익명 레코드 형식에서 여러 번 나타납니다. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods 'let! ... and! ...' 구문은 계산 식 작성기에서 '{0}' 메서드 또는 적절한 'MergeSources' 및 'Bind' 메서드를 정의한 경우에만 사용할 수 있습니다. @@ -1797,6 +1837,11 @@ 특성은 optional, in, out, ParamArray, CallerInfo, Quote 인수를 지정할 수 없습니다. + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index 23a194ff258..26331cbf1cd 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -582,6 +582,11 @@ wyświetlanie na liście literałów o dowolnym rozmiarze + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells komunikaty informacyjne związane z odwołaniami do komórek @@ -1207,6 +1212,16 @@ Oczekiwano treści elementu członkowskiego + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Brak nazwy przypadku unii @@ -1437,6 +1452,11 @@ Pole „{0}” występuje wielokrotnie w tym anonimowym typie rekordu. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods Konstrukcji „let! ... and! ...” można użyć tylko wtedy, gdy konstruktor wyrażeń obliczeniowych definiuje metodę „{0}” lub odpowiednie metody „MergeSource” i „Bind” @@ -1797,6 +1837,11 @@ Cecha nie może określać opcjonalnych argumentów in, out, ParamArray, CallerInfo lub Quote + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 503fc0f073f..b69ebb59aea 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -582,6 +582,11 @@ literais de lista de qualquer tamanho + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells mensagens informativas relacionadas a células de referência @@ -1207,6 +1212,16 @@ Esperando corpo do membro + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Nome do caso de união ausente @@ -1437,6 +1452,11 @@ O campo '{0}' aparece várias vezes nesse tipo de registro anônimo. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods O “let! ... and! ...” só poderá ser usada se o construtor de expressão de cálculo definir um método “{0}” ou métodos “MergeSources” e “Bind” apropriados @@ -1797,6 +1837,11 @@ Uma característica não pode especificar os argumentos optional, in, out, ParamArray, CallerInfo ou Quote + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index 7013fb0bc83..78b9c3b83d6 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -582,6 +582,11 @@ список литералов любого размера + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells информационные сообщения, связанные с ссылочными ячейками @@ -1207,6 +1212,16 @@ Требуется текст сообщения элемента + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Отсутствует имя случая объединения @@ -1437,6 +1452,11 @@ Поле "{0}" появляется несколько раз в этом типе анонимной записи. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods Конструкцию "let! ... and! ..." можно использовать только в том случае, если построитель выражений с вычислениями определяет либо метод "{0}", либо соответствующие методы "MergeSources" и "Bind" @@ -1797,6 +1837,11 @@ Признак не может указывать необязательные аргументы in, out, ParamArray, CallerInfo или Quote + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 49d2a295b45..3d4884f0d1d 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -582,6 +582,11 @@ tüm boyutlardaki sabit değerleri listele + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells başvuru hücreleriyle ilgili bilgi mesajları @@ -1207,6 +1212,16 @@ Üye gövdesi bekleniyor + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name Birleşim durumu adı eksik @@ -1437,6 +1452,11 @@ '{0}' alanı bu anonim kayıt türünde birden fazla yerde görünüyor. + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods 'let! ... and! ...' yapısı, yalnızca hesaplama ifadesi oluşturucu bir '{0}' metodunu ya da uygun 'MergeSources' ve 'Bind' metotlarını tanımlarsa kullanılabilir @@ -1797,6 +1837,11 @@ Bir nitelik optional, in, out, ParamArray, CallerInfo veya Quote bağımsız değişkenlerini belirtemiyor + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index 3fc65eebc96..6bed9016255 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -582,6 +582,11 @@ 列出任何大小的文本 + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells 与引用单元格相关的信息性消息 @@ -1207,6 +1212,16 @@ 预期成员正文 + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name 缺少联合用例名称 @@ -1437,6 +1452,11 @@ 字段“{0}”在此匿名记录类型中多次出现。 + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods 仅当计算表达式生成器定义了 "{0}" 方法或适当的 "MergeSources" 和 "Bind" 方法时,才可以使用 "let! ... and! ..." 构造 @@ -1797,6 +1837,11 @@ 特征不能指定 option、in、out、ParamArray、CallerInfo 或 Quote 参数 + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index 07fea0efd23..776d35d510a 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -582,6 +582,11 @@ 列出任何大小的常值 + + record type and expression spreads + record type and expression spreads + + informational messages related to reference cells 與參考儲存格相關的資訊訊息 @@ -1207,6 +1212,16 @@ 必須是成員主體 + + Missing spread source expression after '...'. + Missing spread source expression after '...'. + + + + Missing spread source type after '...'. + Missing spread source type after '...'. + + Missing union case name 遺漏聯集案例名稱 @@ -1437,6 +1452,11 @@ 欄位 '{0}' 在這個匿名記錄類型中出現多次。 + + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type. + + This attribute is not valid for use on union cases with fields. This attribute is not valid for use on union cases with fields. @@ -1712,6 +1732,26 @@ You can remove this `nonNull` assertion. + + Spread field '{0}' shadows an explicitly declared field with the same name. + Spread field '{0}' shadows an explicitly declared field with the same name. + + + + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + The source expression of a spread into a nominal record expression must have a nominal or anonymous record type. + + + + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + Spread field '{0}' from type '{1}' shadows an explicitly declared field with the same name. + + + + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + The source type of a spread into a record type definition must itself be a nominal or anonymous record type. + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSources' and 'Bind' methods 只有在計算運算式產生器定義 '{0}' 方法或正確的 'MergeSource' 和 'Bind' 方法時,才可使用 'let! ... and! ...' 建構 @@ -1797,6 +1837,11 @@ 特徵不能指定選擇性、in、out、ParamArray、CallerInfo 或 Quote 引數 + + This type definition involves a cyclic reference through a spread. + This type definition involves a cyclic reference through a spread. + + The type '{0}' does not support a nullness qualification. The type '{0}' does not support a nullness qualification. diff --git a/src/Compiler/xlf/FSStrings.cs.xlf b/src/Compiler/xlf/FSStrings.cs.xlf index 80fc8d575a2..194e6b3d583 100644 --- a/src/Compiler/xlf/FSStrings.cs.xlf +++ b/src/Compiler/xlf/FSStrings.cs.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' symbol ..^ diff --git a/src/Compiler/xlf/FSStrings.de.xlf b/src/Compiler/xlf/FSStrings.de.xlf index cad73cb05c3..26cfb2f84ec 100644 --- a/src/Compiler/xlf/FSStrings.de.xlf +++ b/src/Compiler/xlf/FSStrings.de.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' Symbol "..^" diff --git a/src/Compiler/xlf/FSStrings.es.xlf b/src/Compiler/xlf/FSStrings.es.xlf index e262a1eae44..ed154844814 100644 --- a/src/Compiler/xlf/FSStrings.es.xlf +++ b/src/Compiler/xlf/FSStrings.es.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' símbolo "..^" diff --git a/src/Compiler/xlf/FSStrings.fr.xlf b/src/Compiler/xlf/FSStrings.fr.xlf index 0a265c96bea..fdb8170c92b 100644 --- a/src/Compiler/xlf/FSStrings.fr.xlf +++ b/src/Compiler/xlf/FSStrings.fr.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' symbole '..^' diff --git a/src/Compiler/xlf/FSStrings.it.xlf b/src/Compiler/xlf/FSStrings.it.xlf index b0ceff4e83a..29cad9ff767 100644 --- a/src/Compiler/xlf/FSStrings.it.xlf +++ b/src/Compiler/xlf/FSStrings.it.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' simbolo '..^' diff --git a/src/Compiler/xlf/FSStrings.ja.xlf b/src/Compiler/xlf/FSStrings.ja.xlf index 58439655441..cf6f65d6779 100644 --- a/src/Compiler/xlf/FSStrings.ja.xlf +++ b/src/Compiler/xlf/FSStrings.ja.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' シンボル '..^' diff --git a/src/Compiler/xlf/FSStrings.ko.xlf b/src/Compiler/xlf/FSStrings.ko.xlf index 84886e9c6ca..2f301f5e303 100644 --- a/src/Compiler/xlf/FSStrings.ko.xlf +++ b/src/Compiler/xlf/FSStrings.ko.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' 기호 '..^' diff --git a/src/Compiler/xlf/FSStrings.pl.xlf b/src/Compiler/xlf/FSStrings.pl.xlf index 04e2db874cd..68fdfea5151 100644 --- a/src/Compiler/xlf/FSStrings.pl.xlf +++ b/src/Compiler/xlf/FSStrings.pl.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' symbol „..^” diff --git a/src/Compiler/xlf/FSStrings.pt-BR.xlf b/src/Compiler/xlf/FSStrings.pt-BR.xlf index ecce364bb99..f9793d57d15 100644 --- a/src/Compiler/xlf/FSStrings.pt-BR.xlf +++ b/src/Compiler/xlf/FSStrings.pt-BR.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' símbolo '..^' diff --git a/src/Compiler/xlf/FSStrings.ru.xlf b/src/Compiler/xlf/FSStrings.ru.xlf index fff4ab3f12d..975e1689c8c 100644 --- a/src/Compiler/xlf/FSStrings.ru.xlf +++ b/src/Compiler/xlf/FSStrings.ru.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' символ "..^" diff --git a/src/Compiler/xlf/FSStrings.tr.xlf b/src/Compiler/xlf/FSStrings.tr.xlf index 69a73dfd9fd..cb931fe35ce 100644 --- a/src/Compiler/xlf/FSStrings.tr.xlf +++ b/src/Compiler/xlf/FSStrings.tr.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' '..^' sembolü diff --git a/src/Compiler/xlf/FSStrings.zh-Hans.xlf b/src/Compiler/xlf/FSStrings.zh-Hans.xlf index f2f98d4e788..7f4d4849df9 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hans.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hans.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' 符号 "..^" diff --git a/src/Compiler/xlf/FSStrings.zh-Hant.xlf b/src/Compiler/xlf/FSStrings.zh-Hant.xlf index 571fa7b1446..3a0ac4fba7e 100644 --- a/src/Compiler/xlf/FSStrings.zh-Hant.xlf +++ b/src/Compiler/xlf/FSStrings.zh-Hant.xlf @@ -92,6 +92,11 @@ symbol '|' (directly before 'null') + + symbol '...' + symbol '...' + + symbol '..^' 符號 '..^' diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs index 173f18537a5..3ff158d510b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Constraints/Unmanaged.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace Conformance.Constraints diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs index 69c14a8d418..7b6962ea0a0 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/AnonymousRecords.fs @@ -446,7 +446,7 @@ let v = {| A = 1; A = 2 |} |> compile |> shouldFail |> withDiagnostics [ - (Error 3522, Line 2, Col 12, Line 2, Col 13, "The field 'A' appears multiple times in this record expression.") + (Error 3522, Line 2, Col 19, Line 2, Col 24, "The field 'A' appears multiple times in this record expression.") ] [] @@ -457,8 +457,8 @@ let v = {| A = 1; A = 2; A = 3 |} |> compile |> shouldFail |> withDiagnostics [ - (Error 3522, Line 2, Col 12, Line 2, Col 13, "The field 'A' appears multiple times in this record expression.") - (Error 3522, Line 2, Col 19, Line 2, Col 20, "The field 'A' appears multiple times in this record expression.") + Error 3522, Line 2, Col 19, Line 2, Col 24, "The field 'A' appears multiple times in this record expression." + Error 3522, Line 2, Col 26, Line 2, Col 31, "The field 'A' appears multiple times in this record expression." ] [] @@ -469,8 +469,8 @@ let v = {| A = 0; B = 2; A = 5; B = 6 |} |> compile |> shouldFail |> withDiagnostics [ - (Error 3522, Line 2, Col 12, Line 2, Col 13, "The field 'A' appears multiple times in this record expression.") - (Error 3522, Line 2, Col 19, Line 2, Col 20, "The field 'B' appears multiple times in this record expression.") + Error 3522, Line 2, Col 26, Line 2, Col 31, "The field 'A' appears multiple times in this record expression." + Error 3522, Line 2, Col 33, Line 2, Col 38, "The field 'B' appears multiple times in this record expression." ] [] @@ -481,7 +481,7 @@ let v = {| A = 2; C = "W"; A = 8; B = 6 |} |> compile |> shouldFail |> withDiagnostics [ - (Error 3522, Line 2, Col 12, Line 2, Col 13, "The field 'A' appears multiple times in this record expression.") + Error 3522, Line 2, Col 28, Line 2, Col 33, "The field 'A' appears multiple times in this record expression." ] [] @@ -492,8 +492,8 @@ let v = {| A = 0; C = ""; A = 1; B = 2; A = 5 |} |> compile |> shouldFail |> withDiagnostics [ - (Error 3522, Line 2, Col 12, Line 2, Col 13, "The field 'A' appears multiple times in this record expression.") - (Error 3522, Line 2, Col 27, Line 2, Col 28, "The field 'A' appears multiple times in this record expression.") + Error 3522, Line 2, Col 27, Line 2, Col 32, "The field 'A' appears multiple times in this record expression." + Error 3522, Line 2, Col 41, Line 2, Col 46, "The field 'A' appears multiple times in this record expression." ] [] @@ -504,8 +504,8 @@ let v = {| ``A`` = 0; B = 5; A = ""; B = 0 |} |> compile |> shouldFail |> withDiagnostics [ - (Error 3522, Line 2, Col 12, Line 2, Col 17, "The field 'A' appears multiple times in this record expression.") - (Error 3522, Line 2, Col 23, Line 2, Col 24, "The field 'B' appears multiple times in this record expression.") + Error 3522, Line 2, Col 30, Line 2, Col 36, "The field 'A' appears multiple times in this record expression." + Error 3522, Line 2, Col 38, Line 2, Col 43, "The field 'B' appears multiple times in this record expression." ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs index 61b66c956aa..7827fa01e94 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/RecordTypes/RecordTypes.fs @@ -441,7 +441,7 @@ module RecordTypes = |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 4, Col 16, Line 4, Col 17, "The field 'B' appears multiple times in this record expression or pattern") + Error 668, Line 4, Col 25, Line 4, Col 32, "The field 'B' appears multiple times in this record expression or pattern" ] [] @@ -454,8 +454,8 @@ module RecordTypes = |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 4, Col 16, Line 4, Col 17, "The field 'B' appears multiple times in this record expression or pattern") - (Error 668, Line 4, Col 25, Line 4, Col 26, "The field 'B' appears multiple times in this record expression or pattern") + Error 668, Line 4, Col 25, Line 4, Col 32, "The field 'B' appears multiple times in this record expression or pattern" + Error 668, Line 4, Col 34, Line 4, Col 41, "The field 'B' appears multiple times in this record expression or pattern" ] [] @@ -468,8 +468,8 @@ module RecordTypes = |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 4, Col 16, Line 4, Col 17, "The field 'A' appears multiple times in this record expression or pattern") - (Error 668, Line 4, Col 23, Line 4, Col 24, "The field 'B' appears multiple times in this record expression or pattern") + Error 668, Line 4, Col 30, Line 4, Col 35, "The field 'A' appears multiple times in this record expression or pattern" + Error 668, Line 4, Col 37, Line 4, Col 42, "The field 'B' appears multiple times in this record expression or pattern" ] [] @@ -482,7 +482,7 @@ module RecordTypes = |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 4, Col 16, Line 4, Col 17, "The field 'A' appears multiple times in this record expression or pattern") + Error 668, Line 4, Col 31, Line 4, Col 36, "The field 'A' appears multiple times in this record expression or pattern" ] [] @@ -495,8 +495,8 @@ module RecordTypes = |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 4, Col 16, Line 4, Col 17, "The field 'A' appears multiple times in this record expression or pattern") - (Error 668, Line 4, Col 31, Line 4, Col 32, "The field 'A' appears multiple times in this record expression or pattern") + Error 668, Line 4, Col 31, Line 4, Col 36, "The field 'A' appears multiple times in this record expression or pattern" + Error 668, Line 4, Col 45, Line 4, Col 50, "The field 'A' appears multiple times in this record expression or pattern" ] [] @@ -509,8 +509,8 @@ module RecordTypes = |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 4, Col 16, Line 4, Col 21, "The field 'A' appears multiple times in this record expression or pattern") - (Error 668, Line 4, Col 27, Line 4, Col 28, "The field 'B' appears multiple times in this record expression or pattern") + Error 668, Line 4, Col 34, Line 4, Col 39, "The field 'A' appears multiple times in this record expression or pattern" + Error 668, Line 4, Col 41, Line 4, Col 46, "The field 'B' appears multiple times in this record expression or pattern" ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/AnonymousRecordExpressionSpreads.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/AnonymousRecordExpressionSpreads.fs new file mode 100644 index 00000000000..ec36714cf53 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/AnonymousRecordExpressionSpreads.fs @@ -0,0 +1,65 @@ +module EmittedIL.AnonymousRecordExpressionSpreads + +open FSharp.Test +open FSharp.Test.Compiler + +/// Various types in the System.Diagnostics.CodeAnalysis namespace will be generated by the compiler +/// for the Framework target but will be included in the runtime for the .NET (Core) target. +/// Since the only IL that is material here is the field names, types, and ordering, +/// and since the spread logic is entirely framework/runtime-agnostic, +/// it is simpler to run these tests only for the .NET (Core) target. +type TheoryAttribute = TheoryForNETCOREAPPAttribute + +let [] SupportedLangVersion = "preview" + +let verifyCompilation compilation = + compilation + |> withLangVersion SupportedLangVersion + |> asExe + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> compile + |> verifyILBaseline + +[] +let Expression_Anonymous_ExplicitShadowsSpread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Anonymous_ExtraFieldsAreIgnored_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Anonymous_NoOverlap_Explicit_Spread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Anonymous_NoOverlap_Spread_Explicit_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Anonymous_NoOverlap_Spread_Spread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Anonymous_SpreadShadowsExplicit_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Anonymous_SpreadShadowsSpread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExplicitShadowsSpread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExplicitShadowsSpread.fs new file mode 100644 index 00000000000..2dc53c30496 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExplicitShadowsSpread.fs @@ -0,0 +1,4 @@ +let r1 = {| A = 1; B = 2 |} + +let r2 : {| A : string; B : int |} = {| ...r1; A = "A" |} +let r2' : {| A : string; B : int |} = {| {||} with ...r1; A = "A" |} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExplicitShadowsSpread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExplicitShadowsSpread.fs.il.bsl new file mode 100644 index 00000000000..56f93f950ce --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExplicitShadowsSpread.fs.il.bsl @@ -0,0 +1,810 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType986704712`2' r1@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType986704712`2' r2@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType986704712`2' 'r2\'@4' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class '<>f__AnonymousType986704712`2' get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType986704712`2' assembly::r1@1 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType986704712`2' get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType986704712`2' assembly::r2@3 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType986704712`2' 'get_r2\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType986704712`2' assembly::'r2\'@4' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void class '<>f__AnonymousType986704712`2'::.ctor(!0, + !1) + IL_0007: stsfld class '<>f__AnonymousType986704712`2' assembly::r1@1 + IL_000c: ldstr "A" + IL_0011: call class '<>f__AnonymousType986704712`2' assembly::get_r1() + IL_0016: call instance !1 class '<>f__AnonymousType986704712`2'::get_B() + IL_001b: newobj instance void class '<>f__AnonymousType986704712`2'::.ctor(!0, + !1) + IL_0020: stsfld class '<>f__AnonymousType986704712`2' assembly::r2@3 + IL_0025: nop + IL_0026: ldstr "A" + IL_002b: call class '<>f__AnonymousType986704712`2' assembly::get_r1() + IL_0030: call instance !1 class '<>f__AnonymousType986704712`2'::get_B() + IL_0035: newobj instance void class '<>f__AnonymousType986704712`2'::.ctor(!0, + !1) + IL_003a: stsfld class '<>f__AnonymousType986704712`2' assembly::'r2\'@4' + IL_003f: ret + } + + .property class '<>f__AnonymousType986704712`2' + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType986704712`2' assembly::get_r1() + } + .property class '<>f__AnonymousType986704712`2' + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType986704712`2' assembly::get_r2() + } + .property class '<>f__AnonymousType986704712`2' + 'r2\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType986704712`2' assembly::'get_r2\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType986704712`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType986704712`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType986704712`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 39 38 36 37 30 34 37 + 31 32 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType986704712`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType986704712`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType986704712`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType986704712`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType986704712`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType986704712`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType986704712`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType986704712`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType986704712`2'::get_B() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType782303463`0' + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType782303463`0'>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType782303463`0'> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 37 38 32 33 30 33 34 + 36 33 60 30 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType782303463`0',string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType782303463`0'>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType782303463`0',string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType782303463`0',string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType782303463`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.0 + IL_0007: ret + + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f + + IL_000d: ldc.i4.m1 + IL_000e: ret + + IL_000f: ldc.i4.0 + IL_0010: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any '<>f__AnonymousType782303463`0' + IL_0007: tail. + IL_0009: callvirt instance int32 '<>f__AnonymousType782303463`0'::CompareTo(class '<>f__AnonymousType782303463`0') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class '<>f__AnonymousType782303463`0' V_0, + class '<>f__AnonymousType782303463`0' V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any '<>f__AnonymousType782303463`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0018 + + IL_000c: ldarg.1 + IL_000d: unbox.any '<>f__AnonymousType782303463`0' + IL_0012: brfalse.s IL_0016 + + IL_0014: ldc.i4.0 + IL_0015: ret + + IL_0016: ldc.i4.1 + IL_0017: ret + + IL_0018: ldarg.1 + IL_0019: unbox.any '<>f__AnonymousType782303463`0' + IL_001e: brfalse.s IL_0022 + + IL_0020: ldc.i4.m1 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldloc.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 '<>f__AnonymousType782303463`0'::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType782303463`0' obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType782303463`0' V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000a + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldc.i4.0 + IL_000b: ret + + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType782303463`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType782303463`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool '<>f__AnonymousType782303463`0'::Equals(class '<>f__AnonymousType782303463`0', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType782303463`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.1 + IL_0007: ret + + IL_0008: ldc.i4.0 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: ldc.i4.0 + IL_000f: ceq + IL_0011: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType782303463`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType782303463`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool '<>f__AnonymousType782303463`0'::Equals(class '<>f__AnonymousType782303463`0') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExtraFieldsAreIgnored.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExtraFieldsAreIgnored.fs new file mode 100644 index 00000000000..013f35276b6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExtraFieldsAreIgnored.fs @@ -0,0 +1,4 @@ +let src = {| A = 1; B = "B"; C = 3m |} + +let typedTarget : {| B : string |} = {| ...src |} +let typedTarget' : {| B : string |} = {| {||} with ...src |} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExtraFieldsAreIgnored.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExtraFieldsAreIgnored.fs.il.bsl new file mode 100644 index 00000000000..ee071c13410 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_ExtraFieldsAreIgnored.fs.il.bsl @@ -0,0 +1,1248 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) + .ver 2:1:0:0 +} +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3580924027`3' src@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType2283186596`1' typedTarget@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType2283186596`1' 'typedTarget\'@4' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class '<>f__AnonymousType3580924027`3' get_src() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3580924027`3' assembly::src@1 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType2283186596`1' get_typedTarget() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType2283186596`1' assembly::typedTarget@3 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType2283186596`1' 'get_typedTarget\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType2283186596`1' assembly::'typedTarget\'@4' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 9 + IL_0000: ldc.i4.1 + IL_0001: ldstr "B" + IL_0006: ldc.i4.3 + IL_0007: ldc.i4.0 + IL_0008: ldc.i4.0 + IL_0009: ldc.i4.0 + IL_000a: ldc.i4.0 + IL_000b: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0010: newobj instance void class '<>f__AnonymousType3580924027`3'::.ctor(!0, + !1, + !2) + IL_0015: stsfld class '<>f__AnonymousType3580924027`3' assembly::src@1 + IL_001a: call class '<>f__AnonymousType3580924027`3' assembly::get_src() + IL_001f: call instance !1 class '<>f__AnonymousType3580924027`3'::get_B() + IL_0024: newobj instance void class '<>f__AnonymousType2283186596`1'::.ctor(!0) + IL_0029: stsfld class '<>f__AnonymousType2283186596`1' assembly::typedTarget@3 + IL_002e: nop + IL_002f: call class '<>f__AnonymousType3580924027`3' assembly::get_src() + IL_0034: call instance !1 class '<>f__AnonymousType3580924027`3'::get_B() + IL_0039: newobj instance void class '<>f__AnonymousType2283186596`1'::.ctor(!0) + IL_003e: stsfld class '<>f__AnonymousType2283186596`1' assembly::'typedTarget\'@4' + IL_0043: ret + } + + .property class '<>f__AnonymousType3580924027`3' + src() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3580924027`3' assembly::get_src() + } + .property class '<>f__AnonymousType2283186596`1' + typedTarget() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType2283186596`1' assembly::get_typedTarget() + } + .property class '<>f__AnonymousType2283186596`1' + 'typedTarget\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType2283186596`1' assembly::'get_typedTarget\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType2283186596`1'<'j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType2283186596`1'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType2283186596`1'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 32 32 38 33 31 38 36 + 35 39 36 60 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_000d: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType2283186596`1'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType2283186596`1'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType2283186596`1'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType2283186596`1'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType2283186596`1'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0021 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001f + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_0017: tail. + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001e: ret + + IL_001f: ldc.i4.1 + IL_0020: ret + + IL_0021: ldarg.1 + IL_0022: brfalse.s IL_0026 + + IL_0024: ldc.i4.m1 + IL_0025: ret + + IL_0026: ldc.i4.0 + IL_0027: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType2283186596`1'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType2283186596`1'j__TPar'>::CompareTo(class '<>f__AnonymousType2283186596`1') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType2283186596`1'j__TPar'> V_0, + class '<>f__AnonymousType2283186596`1'j__TPar'> V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType2283186596`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_002b + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType2283186596`1'j__TPar'> + IL_0012: brfalse.s IL_0029 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_0021: tail. + IL_0023: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0028: ret + + IL_0029: ldc.i4.1 + IL_002a: ret + + IL_002b: ldarg.1 + IL_002c: unbox.any class '<>f__AnonymousType2283186596`1'j__TPar'> + IL_0031: brfalse.s IL_0035 + + IL_0033: ldc.i4.m1 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0022 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType2283186596`1'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType2283186596`1'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType2283186596`1'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001f + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001d + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_0015: tail. + IL_0017: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001c: ret + + IL_001d: ldc.i4.0 + IL_001e: ret + + IL_001f: ldarg.1 + IL_0020: ldnull + IL_0021: cgt.un + IL_0023: ldc.i4.0 + IL_0024: ceq + IL_0026: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType2283186596`1'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType2283186596`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType2283186596`1'j__TPar'>::Equals(class '<>f__AnonymousType2283186596`1', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType2283186596`1'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001a + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType2283186596`1'j__TPar'>::B@ + IL_0012: tail. + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0019: ret + + IL_001a: ldc.i4.0 + IL_001b: ret + + IL_001c: ldarg.1 + IL_001d: ldnull + IL_001e: cgt.un + IL_0020: ldc.i4.0 + IL_0021: ceq + IL_0023: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType2283186596`1'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType2283186596`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType2283186596`1'j__TPar'>::Equals(class '<>f__AnonymousType2283186596`1') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType2283186596`1'::get_B() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType3580924027`3'<'j__TPar','j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor(!'j__TPar' A, + !'j__TPar' B, + !'j__TPar' C) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 33 35 38 30 39 32 34 + 30 32 37 60 33 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_001b: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0067 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_003a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_003f: stloc.1 + IL_0040: ldloc.1 + IL_0041: ldc.i4.0 + IL_0042: bge.s IL_0046 + + IL_0044: ldloc.1 + IL_0045: ret + + IL_0046: ldloc.1 + IL_0047: ldc.i4.0 + IL_0048: ble.s IL_004c + + IL_004a: ldloc.1 + IL_004b: ret + + IL_004c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0051: ldarg.0 + IL_0052: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0057: ldarg.1 + IL_0058: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005d: tail. + IL_005f: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0064: ret + + IL_0065: ldc.i4.1 + IL_0066: ret + + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType3580924027`3') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0069 + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0067 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0040: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0045: stloc.3 + IL_0046: ldloc.3 + IL_0047: ldc.i4.0 + IL_0048: bge.s IL_004c + + IL_004a: ldloc.3 + IL_004b: ret + + IL_004c: ldloc.3 + IL_004d: ldc.i4.0 + IL_004e: ble.s IL_0052 + + IL_0050: ldloc.3 + IL_0051: ret + + IL_0052: ldarg.2 + IL_0053: ldarg.0 + IL_0054: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0059: ldloc.1 + IL_005a: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005f: tail. + IL_0061: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0066: ret + + IL_0067: ldc.i4.1 + IL_0068: ret + + IL_0069: ldarg.1 + IL_006a: unbox.any class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_006f: brfalse.s IL_0073 + + IL_0071: ldc.i4.m1 + IL_0072: ret + + IL_0073: ldc.i4.0 + IL_0074: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0058 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldc.i4 0x9e3779b9 + IL_0040: ldarg.1 + IL_0041: ldarg.0 + IL_0042: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_004c: ldloc.0 + IL_004d: ldc.i4.6 + IL_004e: shl + IL_004f: ldloc.0 + IL_0050: ldc.i4.2 + IL_0051: shr + IL_0052: add + IL_0053: add + IL_0054: add + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: ret + + IL_0058: ldc.i4.0 + IL_0059: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_004b + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0049 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0047 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_002e: brfalse.s IL_0045 + + IL_0030: ldarg.2 + IL_0031: ldarg.0 + IL_0032: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0037: ldloc.0 + IL_0038: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_003d: tail. + IL_003f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0044: ret + + IL_0045: ldc.i4.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + + IL_004b: ldarg.1 + IL_004c: ldnull + IL_004d: cgt.un + IL_004f: ldc.i4.0 + IL_0050: ceq + IL_0052: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3580924027`3', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0046 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0044 + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_0042 + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0025: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002a: brfalse.s IL_0040 + + IL_002c: ldarg.0 + IL_002d: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0032: ldarg.1 + IL_0033: ldfld !2 class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0038: tail. + IL_003a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_003f: ret + + IL_0040: ldc.i4.0 + IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: ret + + IL_0044: ldc.i4.0 + IL_0045: ret + + IL_0046: ldarg.1 + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: ldc.i4.0 + IL_004b: ceq + IL_004d: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType3580924027`3'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3580924027`3') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3580924027`3'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3580924027`3'::get_B() + } + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3580924027`3'::get_C() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType156874234`0' + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType156874234`0'>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType156874234`0'> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 35 36 38 37 34 32 + 33 34 60 30 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType156874234`0',string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType156874234`0'>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType156874234`0',string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType156874234`0',string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType156874234`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.0 + IL_0007: ret + + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f + + IL_000d: ldc.i4.m1 + IL_000e: ret + + IL_000f: ldc.i4.0 + IL_0010: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any '<>f__AnonymousType156874234`0' + IL_0007: tail. + IL_0009: callvirt instance int32 '<>f__AnonymousType156874234`0'::CompareTo(class '<>f__AnonymousType156874234`0') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class '<>f__AnonymousType156874234`0' V_0, + class '<>f__AnonymousType156874234`0' V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any '<>f__AnonymousType156874234`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0018 + + IL_000c: ldarg.1 + IL_000d: unbox.any '<>f__AnonymousType156874234`0' + IL_0012: brfalse.s IL_0016 + + IL_0014: ldc.i4.0 + IL_0015: ret + + IL_0016: ldc.i4.1 + IL_0017: ret + + IL_0018: ldarg.1 + IL_0019: unbox.any '<>f__AnonymousType156874234`0' + IL_001e: brfalse.s IL_0022 + + IL_0020: ldc.i4.m1 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldloc.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 '<>f__AnonymousType156874234`0'::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType156874234`0' obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType156874234`0' V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000a + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldc.i4.0 + IL_000b: ret + + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType156874234`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType156874234`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool '<>f__AnonymousType156874234`0'::Equals(class '<>f__AnonymousType156874234`0', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType156874234`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.1 + IL_0007: ret + + IL_0008: ldc.i4.0 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: ldc.i4.0 + IL_000f: ceq + IL_0011: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType156874234`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType156874234`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool '<>f__AnonymousType156874234`0'::Equals(class '<>f__AnonymousType156874234`0') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Explicit_Spread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Explicit_Spread.fs new file mode 100644 index 00000000000..11da3619de6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Explicit_Spread.fs @@ -0,0 +1,4 @@ +let r1 = {| A = 1; B = 2 |} + +let r2 : {| A : int ; B : int; C : int |} = {| C = 3; ...r1 |} +let r2' : {| A : int ; B : int; C : int |} = {| {||} with C = 3; ...r1 |} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Explicit_Spread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Explicit_Spread.fs.il.bsl new file mode 100644 index 00000000000..fd5848733d7 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Explicit_Spread.fs.il.bsl @@ -0,0 +1,1353 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3037170192`2' r1@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType4283677192`3' r2@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType4283677192`3' 'r2\'@4' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class '<>f__AnonymousType3037170192`2' get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3037170192`2' assembly::r1@1 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType4283677192`3' get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType4283677192`3' assembly::r2@3 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType4283677192`3' 'get_r2\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType4283677192`3' assembly::'r2\'@4' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void class '<>f__AnonymousType3037170192`2'::.ctor(!0, + !1) + IL_0007: stsfld class '<>f__AnonymousType3037170192`2' assembly::r1@1 + IL_000c: call class '<>f__AnonymousType3037170192`2' assembly::get_r1() + IL_0011: call instance !0 class '<>f__AnonymousType3037170192`2'::get_A() + IL_0016: call class '<>f__AnonymousType3037170192`2' assembly::get_r1() + IL_001b: call instance !1 class '<>f__AnonymousType3037170192`2'::get_B() + IL_0020: ldc.i4.3 + IL_0021: newobj instance void class '<>f__AnonymousType4283677192`3'::.ctor(!0, + !1, + !2) + IL_0026: stsfld class '<>f__AnonymousType4283677192`3' assembly::r2@3 + IL_002b: nop + IL_002c: call class '<>f__AnonymousType3037170192`2' assembly::get_r1() + IL_0031: call instance !0 class '<>f__AnonymousType3037170192`2'::get_A() + IL_0036: call class '<>f__AnonymousType3037170192`2' assembly::get_r1() + IL_003b: call instance !1 class '<>f__AnonymousType3037170192`2'::get_B() + IL_0040: ldc.i4.3 + IL_0041: newobj instance void class '<>f__AnonymousType4283677192`3'::.ctor(!0, + !1, + !2) + IL_0046: stsfld class '<>f__AnonymousType4283677192`3' assembly::'r2\'@4' + IL_004b: ret + } + + .property class '<>f__AnonymousType3037170192`2' + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3037170192`2' assembly::get_r1() + } + .property class '<>f__AnonymousType4283677192`3' + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType4283677192`3' assembly::get_r2() + } + .property class '<>f__AnonymousType4283677192`3' + 'r2\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType4283677192`3' assembly::'get_r2\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1607296883`0' + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1607296883`0'>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1607296883`0'> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 36 30 37 32 39 36 + 38 38 33 60 30 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1607296883`0',string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1607296883`0'>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1607296883`0',string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1607296883`0',string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1607296883`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.0 + IL_0007: ret + + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f + + IL_000d: ldc.i4.m1 + IL_000e: ret + + IL_000f: ldc.i4.0 + IL_0010: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any '<>f__AnonymousType1607296883`0' + IL_0007: tail. + IL_0009: callvirt instance int32 '<>f__AnonymousType1607296883`0'::CompareTo(class '<>f__AnonymousType1607296883`0') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class '<>f__AnonymousType1607296883`0' V_0, + class '<>f__AnonymousType1607296883`0' V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any '<>f__AnonymousType1607296883`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0018 + + IL_000c: ldarg.1 + IL_000d: unbox.any '<>f__AnonymousType1607296883`0' + IL_0012: brfalse.s IL_0016 + + IL_0014: ldc.i4.0 + IL_0015: ret + + IL_0016: ldc.i4.1 + IL_0017: ret + + IL_0018: ldarg.1 + IL_0019: unbox.any '<>f__AnonymousType1607296883`0' + IL_001e: brfalse.s IL_0022 + + IL_0020: ldc.i4.m1 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldloc.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 '<>f__AnonymousType1607296883`0'::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1607296883`0' obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1607296883`0' V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000a + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldc.i4.0 + IL_000b: ret + + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1607296883`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType1607296883`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool '<>f__AnonymousType1607296883`0'::Equals(class '<>f__AnonymousType1607296883`0', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1607296883`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.1 + IL_0007: ret + + IL_0008: ldc.i4.0 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: ldc.i4.0 + IL_000f: ceq + IL_0011: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1607296883`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType1607296883`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool '<>f__AnonymousType1607296883`0'::Equals(class '<>f__AnonymousType1607296883`0') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType3037170192`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 33 30 33 37 31 37 30 + 31 39 32 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType3037170192`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType3037170192`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3037170192`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType3037170192`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3037170192`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3037170192`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3037170192`2'::get_B() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType4283677192`3'<'j__TPar','j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor(!'j__TPar' A, + !'j__TPar' B, + !'j__TPar' C) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 34 32 38 33 36 37 37 + 31 39 32 60 33 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_001b: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0067 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_003a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_003f: stloc.1 + IL_0040: ldloc.1 + IL_0041: ldc.i4.0 + IL_0042: bge.s IL_0046 + + IL_0044: ldloc.1 + IL_0045: ret + + IL_0046: ldloc.1 + IL_0047: ldc.i4.0 + IL_0048: ble.s IL_004c + + IL_004a: ldloc.1 + IL_004b: ret + + IL_004c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0051: ldarg.0 + IL_0052: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0057: ldarg.1 + IL_0058: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005d: tail. + IL_005f: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0064: ret + + IL_0065: ldc.i4.1 + IL_0066: ret + + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType4283677192`3') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0069 + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0067 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0040: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0045: stloc.3 + IL_0046: ldloc.3 + IL_0047: ldc.i4.0 + IL_0048: bge.s IL_004c + + IL_004a: ldloc.3 + IL_004b: ret + + IL_004c: ldloc.3 + IL_004d: ldc.i4.0 + IL_004e: ble.s IL_0052 + + IL_0050: ldloc.3 + IL_0051: ret + + IL_0052: ldarg.2 + IL_0053: ldarg.0 + IL_0054: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0059: ldloc.1 + IL_005a: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005f: tail. + IL_0061: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0066: ret + + IL_0067: ldc.i4.1 + IL_0068: ret + + IL_0069: ldarg.1 + IL_006a: unbox.any class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_006f: brfalse.s IL_0073 + + IL_0071: ldc.i4.m1 + IL_0072: ret + + IL_0073: ldc.i4.0 + IL_0074: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0058 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldc.i4 0x9e3779b9 + IL_0040: ldarg.1 + IL_0041: ldarg.0 + IL_0042: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_004c: ldloc.0 + IL_004d: ldc.i4.6 + IL_004e: shl + IL_004f: ldloc.0 + IL_0050: ldc.i4.2 + IL_0051: shr + IL_0052: add + IL_0053: add + IL_0054: add + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: ret + + IL_0058: ldc.i4.0 + IL_0059: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_004b + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0049 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0047 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_002e: brfalse.s IL_0045 + + IL_0030: ldarg.2 + IL_0031: ldarg.0 + IL_0032: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0037: ldloc.0 + IL_0038: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_003d: tail. + IL_003f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0044: ret + + IL_0045: ldc.i4.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + + IL_004b: ldarg.1 + IL_004c: ldnull + IL_004d: cgt.un + IL_004f: ldc.i4.0 + IL_0050: ceq + IL_0052: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType4283677192`3', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0046 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0044 + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_0042 + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0025: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002a: brfalse.s IL_0040 + + IL_002c: ldarg.0 + IL_002d: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0032: ldarg.1 + IL_0033: ldfld !2 class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0038: tail. + IL_003a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_003f: ret + + IL_0040: ldc.i4.0 + IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: ret + + IL_0044: ldc.i4.0 + IL_0045: ret + + IL_0046: ldarg.1 + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: ldc.i4.0 + IL_004b: ceq + IL_004d: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType4283677192`3'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType4283677192`3') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType4283677192`3'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType4283677192`3'::get_B() + } + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType4283677192`3'::get_C() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Explicit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Explicit.fs new file mode 100644 index 00000000000..4d655240010 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Explicit.fs @@ -0,0 +1,4 @@ +let r1 = {| A = 1; B = 2 |} + +let r2 : {| A : int ; B : int; C : int |} = {| ...r1; C = 3 |} +let r2' : {| A : int ; B : int; C : int |} = {| {||} with ...r1; C = 3 |} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Explicit.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Explicit.fs.il.bsl new file mode 100644 index 00000000000..8a52b8b1588 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Explicit.fs.il.bsl @@ -0,0 +1,1353 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType998605617`2' r1@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1772839104`3' r2@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1772839104`3' 'r2\'@4' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class '<>f__AnonymousType998605617`2' get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType998605617`2' assembly::r1@1 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1772839104`3' get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1772839104`3' assembly::r2@3 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1772839104`3' 'get_r2\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1772839104`3' assembly::'r2\'@4' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void class '<>f__AnonymousType998605617`2'::.ctor(!0, + !1) + IL_0007: stsfld class '<>f__AnonymousType998605617`2' assembly::r1@1 + IL_000c: call class '<>f__AnonymousType998605617`2' assembly::get_r1() + IL_0011: call instance !0 class '<>f__AnonymousType998605617`2'::get_A() + IL_0016: call class '<>f__AnonymousType998605617`2' assembly::get_r1() + IL_001b: call instance !1 class '<>f__AnonymousType998605617`2'::get_B() + IL_0020: ldc.i4.3 + IL_0021: newobj instance void class '<>f__AnonymousType1772839104`3'::.ctor(!0, + !1, + !2) + IL_0026: stsfld class '<>f__AnonymousType1772839104`3' assembly::r2@3 + IL_002b: nop + IL_002c: call class '<>f__AnonymousType998605617`2' assembly::get_r1() + IL_0031: call instance !0 class '<>f__AnonymousType998605617`2'::get_A() + IL_0036: call class '<>f__AnonymousType998605617`2' assembly::get_r1() + IL_003b: call instance !1 class '<>f__AnonymousType998605617`2'::get_B() + IL_0040: ldc.i4.3 + IL_0041: newobj instance void class '<>f__AnonymousType1772839104`3'::.ctor(!0, + !1, + !2) + IL_0046: stsfld class '<>f__AnonymousType1772839104`3' assembly::'r2\'@4' + IL_004b: ret + } + + .property class '<>f__AnonymousType998605617`2' + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType998605617`2' assembly::get_r1() + } + .property class '<>f__AnonymousType1772839104`3' + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1772839104`3' assembly::get_r2() + } + .property class '<>f__AnonymousType1772839104`3' + 'r2\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1772839104`3' assembly::'get_r2\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType3808110725`0' + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType3808110725`0'>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType3808110725`0'> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 33 38 30 38 31 31 30 + 37 32 35 60 30 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType3808110725`0',string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType3808110725`0'>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType3808110725`0',string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType3808110725`0',string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType3808110725`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.0 + IL_0007: ret + + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f + + IL_000d: ldc.i4.m1 + IL_000e: ret + + IL_000f: ldc.i4.0 + IL_0010: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any '<>f__AnonymousType3808110725`0' + IL_0007: tail. + IL_0009: callvirt instance int32 '<>f__AnonymousType3808110725`0'::CompareTo(class '<>f__AnonymousType3808110725`0') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class '<>f__AnonymousType3808110725`0' V_0, + class '<>f__AnonymousType3808110725`0' V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any '<>f__AnonymousType3808110725`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0018 + + IL_000c: ldarg.1 + IL_000d: unbox.any '<>f__AnonymousType3808110725`0' + IL_0012: brfalse.s IL_0016 + + IL_0014: ldc.i4.0 + IL_0015: ret + + IL_0016: ldc.i4.1 + IL_0017: ret + + IL_0018: ldarg.1 + IL_0019: unbox.any '<>f__AnonymousType3808110725`0' + IL_001e: brfalse.s IL_0022 + + IL_0020: ldc.i4.m1 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldloc.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 '<>f__AnonymousType3808110725`0'::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType3808110725`0' obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType3808110725`0' V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000a + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldc.i4.0 + IL_000b: ret + + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3808110725`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType3808110725`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool '<>f__AnonymousType3808110725`0'::Equals(class '<>f__AnonymousType3808110725`0', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType3808110725`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.1 + IL_0007: ret + + IL_0008: ldc.i4.0 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: ldc.i4.0 + IL_000f: ceq + IL_0011: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType3808110725`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType3808110725`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool '<>f__AnonymousType3808110725`0'::Equals(class '<>f__AnonymousType3808110725`0') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType998605617`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType998605617`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType998605617`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 39 39 38 36 30 35 36 + 31 37 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType998605617`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType998605617`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType998605617`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType998605617`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType998605617`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType998605617`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType998605617`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType998605617`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType998605617`2'::get_B() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1772839104`3'<'j__TPar','j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor(!'j__TPar' A, + !'j__TPar' B, + !'j__TPar' C) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 37 37 32 38 33 39 + 31 30 34 60 33 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_001b: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0067 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_003a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_003f: stloc.1 + IL_0040: ldloc.1 + IL_0041: ldc.i4.0 + IL_0042: bge.s IL_0046 + + IL_0044: ldloc.1 + IL_0045: ret + + IL_0046: ldloc.1 + IL_0047: ldc.i4.0 + IL_0048: ble.s IL_004c + + IL_004a: ldloc.1 + IL_004b: ret + + IL_004c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0051: ldarg.0 + IL_0052: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0057: ldarg.1 + IL_0058: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005d: tail. + IL_005f: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0064: ret + + IL_0065: ldc.i4.1 + IL_0066: ret + + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c + + IL_006a: ldc.i4.m1 + IL_006b: ret + + IL_006c: ldc.i4.0 + IL_006d: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1772839104`3') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0069 + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0067 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0040: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0045: stloc.3 + IL_0046: ldloc.3 + IL_0047: ldc.i4.0 + IL_0048: bge.s IL_004c + + IL_004a: ldloc.3 + IL_004b: ret + + IL_004c: ldloc.3 + IL_004d: ldc.i4.0 + IL_004e: ble.s IL_0052 + + IL_0050: ldloc.3 + IL_0051: ret + + IL_0052: ldarg.2 + IL_0053: ldarg.0 + IL_0054: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0059: ldloc.1 + IL_005a: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005f: tail. + IL_0061: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0066: ret + + IL_0067: ldc.i4.1 + IL_0068: ret + + IL_0069: ldarg.1 + IL_006a: unbox.any class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_006f: brfalse.s IL_0073 + + IL_0071: ldc.i4.m1 + IL_0072: ret + + IL_0073: ldc.i4.0 + IL_0074: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0058 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldc.i4 0x9e3779b9 + IL_0040: ldarg.1 + IL_0041: ldarg.0 + IL_0042: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_004c: ldloc.0 + IL_004d: ldc.i4.6 + IL_004e: shl + IL_004f: ldloc.0 + IL_0050: ldc.i4.2 + IL_0051: shr + IL_0052: add + IL_0053: add + IL_0054: add + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: ret + + IL_0058: ldc.i4.0 + IL_0059: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_004b + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0049 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0047 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_002e: brfalse.s IL_0045 + + IL_0030: ldarg.2 + IL_0031: ldarg.0 + IL_0032: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0037: ldloc.0 + IL_0038: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_003d: tail. + IL_003f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0044: ret + + IL_0045: ldc.i4.0 + IL_0046: ret + + IL_0047: ldc.i4.0 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + + IL_004b: ldarg.1 + IL_004c: ldnull + IL_004d: cgt.un + IL_004f: ldc.i4.0 + IL_0050: ceq + IL_0052: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1772839104`3', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0046 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0044 + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_0042 + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0025: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002a: brfalse.s IL_0040 + + IL_002c: ldarg.0 + IL_002d: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0032: ldarg.1 + IL_0033: ldfld !2 class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0038: tail. + IL_003a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_003f: ret + + IL_0040: ldc.i4.0 + IL_0041: ret + + IL_0042: ldc.i4.0 + IL_0043: ret + + IL_0044: ldc.i4.0 + IL_0045: ret + + IL_0046: ldarg.1 + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: ldc.i4.0 + IL_004b: ceq + IL_004d: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1772839104`3'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1772839104`3') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1772839104`3'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1772839104`3'::get_B() + } + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1772839104`3'::get_C() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Spread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Spread.fs new file mode 100644 index 00000000000..89412152572 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Spread.fs @@ -0,0 +1,7 @@ +let r1 = {| A = 1 ; B = 2 |} +let r2 = {| C = 3; D = 4 |} + +let r3 : {| A : int ; B : int; C : int; D : int |} = {| ...r1; ...r2 |} +let r4 : {| A : int ; B : int; C : int; D : int |} = {| ...r2; ...r3 |} +let r3' : {| A : int ; B : int; C : int; D : int |} = {| {||} with ...r1; ...r2 |} +let r4' : {| A : int ; B : int; C : int; D : int |} = {| {||} with ...r2; ...r3 |} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Spread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Spread.fs.il.bsl new file mode 100644 index 00000000000..2e73af13744 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_NoOverlap_Spread_Spread.fs.il.bsl @@ -0,0 +1,1976 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1261546922`2' r1@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType2413989789`2' r2@2 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1583142996`4' r3@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1583142996`4' r4@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1583142996`4' 'r3\'@6' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1583142996`4' 'r4\'@7' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class '<>f__AnonymousType1261546922`2' get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1261546922`2' assembly::r1@1 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType2413989789`2' get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType2413989789`2' assembly::r2@2 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1583142996`4' get_r3() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1583142996`4' assembly::r3@4 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1583142996`4' get_r4() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1583142996`4' assembly::r4@5 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1583142996`4' 'get_r3\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1583142996`4' assembly::'r3\'@6' + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1583142996`4' 'get_r4\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1583142996`4' assembly::'r4\'@7' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 6 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void class '<>f__AnonymousType1261546922`2'::.ctor(!0, + !1) + IL_0007: stsfld class '<>f__AnonymousType1261546922`2' assembly::r1@1 + IL_000c: ldc.i4.3 + IL_000d: ldc.i4.4 + IL_000e: newobj instance void class '<>f__AnonymousType2413989789`2'::.ctor(!0, + !1) + IL_0013: stsfld class '<>f__AnonymousType2413989789`2' assembly::r2@2 + IL_0018: call class '<>f__AnonymousType1261546922`2' assembly::get_r1() + IL_001d: call instance !0 class '<>f__AnonymousType1261546922`2'::get_A() + IL_0022: call class '<>f__AnonymousType1261546922`2' assembly::get_r1() + IL_0027: call instance !1 class '<>f__AnonymousType1261546922`2'::get_B() + IL_002c: call class '<>f__AnonymousType2413989789`2' assembly::get_r2() + IL_0031: call instance !0 class '<>f__AnonymousType2413989789`2'::get_C() + IL_0036: call class '<>f__AnonymousType2413989789`2' assembly::get_r2() + IL_003b: call instance !1 class '<>f__AnonymousType2413989789`2'::get_D() + IL_0040: newobj instance void class '<>f__AnonymousType1583142996`4'::.ctor(!0, + !1, + !2, + !3) + IL_0045: stsfld class '<>f__AnonymousType1583142996`4' assembly::r3@4 + IL_004a: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_004f: call instance !0 class '<>f__AnonymousType1583142996`4'::get_A() + IL_0054: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_0059: call instance !1 class '<>f__AnonymousType1583142996`4'::get_B() + IL_005e: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_0063: call instance !2 class '<>f__AnonymousType1583142996`4'::get_C() + IL_0068: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_006d: call instance !3 class '<>f__AnonymousType1583142996`4'::get_D() + IL_0072: newobj instance void class '<>f__AnonymousType1583142996`4'::.ctor(!0, + !1, + !2, + !3) + IL_0077: stsfld class '<>f__AnonymousType1583142996`4' assembly::r4@5 + IL_007c: nop + IL_007d: call class '<>f__AnonymousType1261546922`2' assembly::get_r1() + IL_0082: call instance !0 class '<>f__AnonymousType1261546922`2'::get_A() + IL_0087: call class '<>f__AnonymousType1261546922`2' assembly::get_r1() + IL_008c: call instance !1 class '<>f__AnonymousType1261546922`2'::get_B() + IL_0091: call class '<>f__AnonymousType2413989789`2' assembly::get_r2() + IL_0096: call instance !0 class '<>f__AnonymousType2413989789`2'::get_C() + IL_009b: call class '<>f__AnonymousType2413989789`2' assembly::get_r2() + IL_00a0: call instance !1 class '<>f__AnonymousType2413989789`2'::get_D() + IL_00a5: newobj instance void class '<>f__AnonymousType1583142996`4'::.ctor(!0, + !1, + !2, + !3) + IL_00aa: stsfld class '<>f__AnonymousType1583142996`4' assembly::'r3\'@6' + IL_00af: nop + IL_00b0: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_00b5: call instance !0 class '<>f__AnonymousType1583142996`4'::get_A() + IL_00ba: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_00bf: call instance !1 class '<>f__AnonymousType1583142996`4'::get_B() + IL_00c4: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_00c9: call instance !2 class '<>f__AnonymousType1583142996`4'::get_C() + IL_00ce: call class '<>f__AnonymousType1583142996`4' assembly::get_r3() + IL_00d3: call instance !3 class '<>f__AnonymousType1583142996`4'::get_D() + IL_00d8: newobj instance void class '<>f__AnonymousType1583142996`4'::.ctor(!0, + !1, + !2, + !3) + IL_00dd: stsfld class '<>f__AnonymousType1583142996`4' assembly::'r4\'@7' + IL_00e2: ret + } + + .property class '<>f__AnonymousType1261546922`2' + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1261546922`2' assembly::get_r1() + } + .property class '<>f__AnonymousType2413989789`2' + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType2413989789`2' assembly::get_r2() + } + .property class '<>f__AnonymousType1583142996`4' + r3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1583142996`4' assembly::get_r3() + } + .property class '<>f__AnonymousType1583142996`4' + r4() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1583142996`4' assembly::get_r4() + } + .property class '<>f__AnonymousType1583142996`4' + 'r3\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1583142996`4' assembly::'get_r3\''() + } + .property class '<>f__AnonymousType1583142996`4' + 'r4\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1583142996`4' assembly::'get_r4\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType2413989789`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' C, !'j__TPar' D) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 32 34 31 33 39 38 39 + 37 38 39 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType2413989789`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType2413989789`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType2413989789`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::C@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::D@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType2413989789`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType2413989789`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType2413989789`2'::get_C() + } + .property instance !'j__TPar' D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType2413989789`2'::get_D() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1583142996`4'<'j__TPar','j__TPar','j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname + instance void .ctor(!'j__TPar' A, + !'j__TPar' B, + !'j__TPar' C, + !'j__TPar' D) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 35 38 33 31 34 32 + 39 39 36 60 34 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_001b: ldarg.0 + IL_001c: ldarg.s D + IL_001e: stfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0023: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0, + int32 V_1, + int32 V_2) + IL_0000: ldarg.0 + IL_0001: brfalse IL_0090 + + IL_0006: ldarg.1 + IL_0007: brfalse IL_008e + + IL_000c: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: ldarg.0 + IL_0012: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0017: ldarg.1 + IL_0018: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0022: stloc.0 + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: bge.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: ldloc.0 + IL_002a: ldc.i4.0 + IL_002b: ble.s IL_002f + + IL_002d: ldloc.0 + IL_002e: ret + + IL_002f: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_003a: ldarg.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0040: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0045: stloc.1 + IL_0046: ldloc.1 + IL_0047: ldc.i4.0 + IL_0048: bge.s IL_004c + + IL_004a: ldloc.1 + IL_004b: ret + + IL_004c: ldloc.1 + IL_004d: ldc.i4.0 + IL_004e: ble.s IL_0052 + + IL_0050: ldloc.1 + IL_0051: ret + + IL_0052: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0057: ldarg.0 + IL_0058: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005d: ldarg.1 + IL_005e: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0063: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0068: stloc.2 + IL_0069: ldloc.2 + IL_006a: ldc.i4.0 + IL_006b: bge.s IL_006f + + IL_006d: ldloc.2 + IL_006e: ret + + IL_006f: ldloc.2 + IL_0070: ldc.i4.0 + IL_0071: ble.s IL_0075 + + IL_0073: ldloc.2 + IL_0074: ret + + IL_0075: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_007a: ldarg.0 + IL_007b: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0080: ldarg.1 + IL_0081: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0086: tail. + IL_0088: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_008d: ret + + IL_008e: ldc.i4.1 + IL_008f: ret + + IL_0090: ldarg.1 + IL_0091: brfalse.s IL_0095 + + IL_0093: ldc.i4.m1 + IL_0094: ret + + IL_0095: ldc.i4.0 + IL_0096: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1583142996`4') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> V_1, + int32 V_2, + int32 V_3, + int32 V_4) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse IL_0093 + + IL_000f: ldarg.1 + IL_0010: unbox.any class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> + IL_0015: brfalse IL_0091 + + IL_001a: ldarg.2 + IL_001b: ldarg.0 + IL_001c: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0021: ldloc.1 + IL_0022: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_002c: stloc.2 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 + + IL_0037: ldloc.2 + IL_0038: ret + + IL_0039: ldarg.2 + IL_003a: ldarg.0 + IL_003b: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0040: ldloc.1 + IL_0041: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0046: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_004b: stloc.3 + IL_004c: ldloc.3 + IL_004d: ldc.i4.0 + IL_004e: bge.s IL_0052 + + IL_0050: ldloc.3 + IL_0051: ret + + IL_0052: ldloc.3 + IL_0053: ldc.i4.0 + IL_0054: ble.s IL_0058 + + IL_0056: ldloc.3 + IL_0057: ret + + IL_0058: ldarg.2 + IL_0059: ldarg.0 + IL_005a: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_005f: ldloc.1 + IL_0060: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0065: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_006a: stloc.s V_4 + IL_006c: ldloc.s V_4 + IL_006e: ldc.i4.0 + IL_006f: bge.s IL_0074 + + IL_0071: ldloc.s V_4 + IL_0073: ret + + IL_0074: ldloc.s V_4 + IL_0076: ldc.i4.0 + IL_0077: ble.s IL_007c + + IL_0079: ldloc.s V_4 + IL_007b: ret + + IL_007c: ldarg.2 + IL_007d: ldarg.0 + IL_007e: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0083: ldloc.1 + IL_0084: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0089: tail. + IL_008b: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0090: ret + + IL_0091: ldc.i4.1 + IL_0092: ret + + IL_0093: ldarg.1 + IL_0094: unbox.any class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> + IL_0099: brfalse.s IL_009d + + IL_009b: ldc.i4.m1 + IL_009c: ret + + IL_009d: ldc.i4.0 + IL_009e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0073 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldc.i4 0x9e3779b9 + IL_0040: ldarg.1 + IL_0041: ldarg.0 + IL_0042: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0047: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_004c: ldloc.0 + IL_004d: ldc.i4.6 + IL_004e: shl + IL_004f: ldloc.0 + IL_0050: ldc.i4.2 + IL_0051: shr + IL_0052: add + IL_0053: add + IL_0054: add + IL_0055: stloc.0 + IL_0056: ldc.i4 0x9e3779b9 + IL_005b: ldarg.1 + IL_005c: ldarg.0 + IL_005d: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0062: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0067: ldloc.0 + IL_0068: ldc.i4.6 + IL_0069: shl + IL_006a: ldloc.0 + IL_006b: ldc.i4.2 + IL_006c: shr + IL_006d: add + IL_006e: add + IL_006f: add + IL_0070: stloc.0 + IL_0071: ldloc.0 + IL_0072: ret + + IL_0073: ldc.i4.0 + IL_0074: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0061 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005f + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_005d + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_002e: brfalse.s IL_005b + + IL_0030: ldarg.2 + IL_0031: ldarg.0 + IL_0032: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0037: ldloc.0 + IL_0038: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_003d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0042: brfalse.s IL_0059 + + IL_0044: ldarg.2 + IL_0045: ldarg.0 + IL_0046: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_004b: ldloc.0 + IL_004c: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0051: tail. + IL_0053: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0058: ret + + IL_0059: ldc.i4.0 + IL_005a: ret + + IL_005b: ldc.i4.0 + IL_005c: ret + + IL_005d: ldc.i4.0 + IL_005e: ret + + IL_005f: ldc.i4.0 + IL_0060: ret + + IL_0061: ldarg.1 + IL_0062: ldnull + IL_0063: cgt.un + IL_0065: ldc.i4.0 + IL_0066: ceq + IL_0068: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1583142996`4', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_005b + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0059 + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_0057 + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::B@ + IL_0025: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002a: brfalse.s IL_0055 + + IL_002c: ldarg.0 + IL_002d: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0032: ldarg.1 + IL_0033: ldfld !2 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::C@ + IL_0038: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_003d: brfalse.s IL_0053 + + IL_003f: ldarg.0 + IL_0040: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_0045: ldarg.1 + IL_0046: ldfld !3 class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::D@ + IL_004b: tail. + IL_004d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0052: ret + + IL_0053: ldc.i4.0 + IL_0054: ret + + IL_0055: ldc.i4.0 + IL_0056: ret + + IL_0057: ldc.i4.0 + IL_0058: ret + + IL_0059: ldc.i4.0 + IL_005a: ret + + IL_005b: ldarg.1 + IL_005c: ldnull + IL_005d: cgt.un + IL_005f: ldc.i4.0 + IL_0060: ceq + IL_0062: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1583142996`4'j__TPar',!'j__TPar',!'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1583142996`4') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1583142996`4'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1583142996`4'::get_B() + } + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1583142996`4'::get_C() + } + .property instance !'j__TPar' D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1583142996`4'::get_D() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1261546922`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 32 36 31 35 34 36 + 39 32 32 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1261546922`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1261546922`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1261546922`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1261546922`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1261546922`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1261546922`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1261546922`2'::get_B() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType471328817`0' + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType471328817`0'>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType471328817`0'> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 34 37 31 33 32 38 38 + 31 37 60 30 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType471328817`0',string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType471328817`0'>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType471328817`0',string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType471328817`0',string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType471328817`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.0 + IL_0007: ret + + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f + + IL_000d: ldc.i4.m1 + IL_000e: ret + + IL_000f: ldc.i4.0 + IL_0010: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any '<>f__AnonymousType471328817`0' + IL_0007: tail. + IL_0009: callvirt instance int32 '<>f__AnonymousType471328817`0'::CompareTo(class '<>f__AnonymousType471328817`0') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class '<>f__AnonymousType471328817`0' V_0, + class '<>f__AnonymousType471328817`0' V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any '<>f__AnonymousType471328817`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0018 + + IL_000c: ldarg.1 + IL_000d: unbox.any '<>f__AnonymousType471328817`0' + IL_0012: brfalse.s IL_0016 + + IL_0014: ldc.i4.0 + IL_0015: ret + + IL_0016: ldc.i4.1 + IL_0017: ret + + IL_0018: ldarg.1 + IL_0019: unbox.any '<>f__AnonymousType471328817`0' + IL_001e: brfalse.s IL_0022 + + IL_0020: ldc.i4.m1 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldloc.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 '<>f__AnonymousType471328817`0'::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType471328817`0' obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType471328817`0' V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000a + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldc.i4.0 + IL_000b: ret + + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType471328817`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType471328817`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool '<>f__AnonymousType471328817`0'::Equals(class '<>f__AnonymousType471328817`0', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType471328817`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.1 + IL_0007: ret + + IL_0008: ldc.i4.0 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: ldc.i4.0 + IL_000f: ceq + IL_0011: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType471328817`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType471328817`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool '<>f__AnonymousType471328817`0'::Equals(class '<>f__AnonymousType471328817`0') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsExplicit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsExplicit.fs new file mode 100644 index 00000000000..3234945a235 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsExplicit.fs @@ -0,0 +1,4 @@ +let r1 = {| A = 1; B = 2 |} + +let r2 : {| A : int; B : int |} = {| A = "A"; ...r1 |} +let r2' : {| A : int; B : int |} = {| {||} with A = "A"; ...r1 |} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsExplicit.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsExplicit.fs.il.bsl new file mode 100644 index 00000000000..dd46c903095 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsExplicit.fs.il.bsl @@ -0,0 +1,812 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1861640520`2' r1@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1861640520`2' r2@3 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1861640520`2' 'r2\'@4' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class '<>f__AnonymousType1861640520`2' get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1861640520`2' assembly::r1@1 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1861640520`2' get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1861640520`2' assembly::r2@3 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1861640520`2' 'get_r2\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1861640520`2' assembly::'r2\'@4' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void class '<>f__AnonymousType1861640520`2'::.ctor(!0, + !1) + IL_0007: stsfld class '<>f__AnonymousType1861640520`2' assembly::r1@1 + IL_000c: call class '<>f__AnonymousType1861640520`2' assembly::get_r1() + IL_0011: call instance !0 class '<>f__AnonymousType1861640520`2'::get_A() + IL_0016: call class '<>f__AnonymousType1861640520`2' assembly::get_r1() + IL_001b: call instance !1 class '<>f__AnonymousType1861640520`2'::get_B() + IL_0020: newobj instance void class '<>f__AnonymousType1861640520`2'::.ctor(!0, + !1) + IL_0025: stsfld class '<>f__AnonymousType1861640520`2' assembly::r2@3 + IL_002a: nop + IL_002b: call class '<>f__AnonymousType1861640520`2' assembly::get_r1() + IL_0030: call instance !0 class '<>f__AnonymousType1861640520`2'::get_A() + IL_0035: call class '<>f__AnonymousType1861640520`2' assembly::get_r1() + IL_003a: call instance !1 class '<>f__AnonymousType1861640520`2'::get_B() + IL_003f: newobj instance void class '<>f__AnonymousType1861640520`2'::.ctor(!0, + !1) + IL_0044: stsfld class '<>f__AnonymousType1861640520`2' assembly::'r2\'@4' + IL_0049: ret + } + + .property class '<>f__AnonymousType1861640520`2' + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1861640520`2' assembly::get_r1() + } + .property class '<>f__AnonymousType1861640520`2' + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1861640520`2' assembly::get_r2() + } + .property class '<>f__AnonymousType1861640520`2' + 'r2\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1861640520`2' assembly::'get_r2\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1861640520`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 38 36 31 36 34 30 + 35 32 30 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1861640520`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1861640520`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1861640520`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1861640520`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1861640520`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1861640520`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1861640520`2'::get_B() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1294727723`0' + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1294727723`0'>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1294727723`0'> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 32 39 34 37 32 37 + 37 32 33 60 30 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1294727723`0',string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1294727723`0'>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1294727723`0',string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1294727723`0',string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1294727723`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.0 + IL_0007: ret + + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f + + IL_000d: ldc.i4.m1 + IL_000e: ret + + IL_000f: ldc.i4.0 + IL_0010: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any '<>f__AnonymousType1294727723`0' + IL_0007: tail. + IL_0009: callvirt instance int32 '<>f__AnonymousType1294727723`0'::CompareTo(class '<>f__AnonymousType1294727723`0') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class '<>f__AnonymousType1294727723`0' V_0, + class '<>f__AnonymousType1294727723`0' V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any '<>f__AnonymousType1294727723`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0018 + + IL_000c: ldarg.1 + IL_000d: unbox.any '<>f__AnonymousType1294727723`0' + IL_0012: brfalse.s IL_0016 + + IL_0014: ldc.i4.0 + IL_0015: ret + + IL_0016: ldc.i4.1 + IL_0017: ret + + IL_0018: ldarg.1 + IL_0019: unbox.any '<>f__AnonymousType1294727723`0' + IL_001e: brfalse.s IL_0022 + + IL_0020: ldc.i4.m1 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldloc.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 '<>f__AnonymousType1294727723`0'::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1294727723`0' obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1294727723`0' V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000a + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldc.i4.0 + IL_000b: ret + + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1294727723`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType1294727723`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool '<>f__AnonymousType1294727723`0'::Equals(class '<>f__AnonymousType1294727723`0', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1294727723`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.1 + IL_0007: ret + + IL_0008: ldc.i4.0 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: ldc.i4.0 + IL_000f: ceq + IL_0011: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1294727723`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType1294727723`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool '<>f__AnonymousType1294727723`0'::Equals(class '<>f__AnonymousType1294727723`0') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsSpread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsSpread.fs new file mode 100644 index 00000000000..c79771f8d7f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsSpread.fs @@ -0,0 +1,8 @@ +let r1 = {| A = 1; B = 2 |} +let r2 = {| A = "A" |} + +let r3 : {| A : string; B : int |} = {| ...r1; ...r2 |} +let r4 : {| A : int; B : int |} = {| ...r2; ...r1 |} + +let r3' : {| A : string; B : int |} = {| {||} with ...r1; ...r2 |} +let r4' : {| A : int; B : int |} = {| {||} with ...r2; ...r1 |} diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsSpread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsSpread.fs.il.bsl new file mode 100644 index 00000000000..5d3279734e8 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Anonymous_SpreadShadowsSpread.fs.il.bsl @@ -0,0 +1,1224 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3872473412`2' r1@1 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3065250744`1' r2@2 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3872473412`2' r3@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 B@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3872473412`2' r4@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3872473412`2' 'r3\'@7' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 'B@7-1' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3872473412`2' 'r4\'@8' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class '<>f__AnonymousType3872473412`2' get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3872473412`2' assembly::r1@1 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType3065250744`1' get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3065250744`1' assembly::r2@2 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType3872473412`2' get_r3() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3872473412`2' assembly::r3@4 + IL_0005: ret + } + + .method assembly specialname static int32 get_B@4() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 assembly::B@4 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType3872473412`2' get_r4() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3872473412`2' assembly::r4@5 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType3872473412`2' 'get_r3\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3872473412`2' assembly::'r3\'@7' + IL_0005: ret + } + + .method assembly specialname static int32 'get_B@7-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 assembly::'B@7-1' + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType3872473412`2' 'get_r4\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3872473412`2' assembly::'r4\'@8' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void class '<>f__AnonymousType3872473412`2'::.ctor(!0, + !1) + IL_0007: stsfld class '<>f__AnonymousType3872473412`2' assembly::r1@1 + IL_000c: ldstr "A" + IL_0011: newobj instance void class '<>f__AnonymousType3065250744`1'::.ctor(!0) + IL_0016: stsfld class '<>f__AnonymousType3065250744`1' assembly::r2@2 + IL_001b: call class '<>f__AnonymousType3872473412`2' assembly::get_r1() + IL_0020: call instance !1 class '<>f__AnonymousType3872473412`2'::get_B() + IL_0025: stsfld int32 assembly::B@4 + IL_002a: call class '<>f__AnonymousType3065250744`1' assembly::get_r2() + IL_002f: call instance !0 class '<>f__AnonymousType3065250744`1'::get_A() + IL_0034: call int32 assembly::get_B@4() + IL_0039: newobj instance void class '<>f__AnonymousType3872473412`2'::.ctor(!0, + !1) + IL_003e: stsfld class '<>f__AnonymousType3872473412`2' assembly::r3@4 + IL_0043: call class '<>f__AnonymousType3872473412`2' assembly::get_r1() + IL_0048: call instance !0 class '<>f__AnonymousType3872473412`2'::get_A() + IL_004d: call class '<>f__AnonymousType3872473412`2' assembly::get_r1() + IL_0052: call instance !1 class '<>f__AnonymousType3872473412`2'::get_B() + IL_0057: newobj instance void class '<>f__AnonymousType3872473412`2'::.ctor(!0, + !1) + IL_005c: stsfld class '<>f__AnonymousType3872473412`2' assembly::r4@5 + IL_0061: nop + IL_0062: call class '<>f__AnonymousType3872473412`2' assembly::get_r1() + IL_0067: call instance !1 class '<>f__AnonymousType3872473412`2'::get_B() + IL_006c: stsfld int32 assembly::'B@7-1' + IL_0071: call class '<>f__AnonymousType3065250744`1' assembly::get_r2() + IL_0076: call instance !0 class '<>f__AnonymousType3065250744`1'::get_A() + IL_007b: call int32 assembly::'get_B@7-1'() + IL_0080: newobj instance void class '<>f__AnonymousType3872473412`2'::.ctor(!0, + !1) + IL_0085: stsfld class '<>f__AnonymousType3872473412`2' assembly::'r3\'@7' + IL_008a: nop + IL_008b: call class '<>f__AnonymousType3872473412`2' assembly::get_r1() + IL_0090: call instance !0 class '<>f__AnonymousType3872473412`2'::get_A() + IL_0095: call class '<>f__AnonymousType3872473412`2' assembly::get_r1() + IL_009a: call instance !1 class '<>f__AnonymousType3872473412`2'::get_B() + IL_009f: newobj instance void class '<>f__AnonymousType3872473412`2'::.ctor(!0, + !1) + IL_00a4: stsfld class '<>f__AnonymousType3872473412`2' assembly::'r4\'@8' + IL_00a9: ret + } + + .property class '<>f__AnonymousType3872473412`2' + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3872473412`2' assembly::get_r1() + } + .property class '<>f__AnonymousType3065250744`1' + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3065250744`1' assembly::get_r2() + } + .property class '<>f__AnonymousType3872473412`2' + r3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3872473412`2' assembly::get_r3() + } + .property int32 B@4() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 assembly::get_B@4() + } + .property class '<>f__AnonymousType3872473412`2' + r4() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3872473412`2' assembly::get_r4() + } + .property class '<>f__AnonymousType3872473412`2' + 'r3\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3872473412`2' assembly::'get_r3\''() + } + .property int32 'B@7-1'() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 assembly::'get_B@7-1'() + } + .property class '<>f__AnonymousType3872473412`2' + 'r4\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3872473412`2' assembly::'get_r4\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType3872473412`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 33 38 37 32 34 37 33 + 34 31 32 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType3872473412`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType3872473412`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3872473412`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType3872473412`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3872473412`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3872473412`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3872473412`2'::get_B() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType4214685905`0' + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType4214685905`0'>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType4214685905`0'> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 34 32 31 34 36 38 35 + 39 30 35 60 30 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType4214685905`0',string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType4214685905`0'>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType4214685905`0',string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType4214685905`0',string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType4214685905`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.0 + IL_0007: ret + + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f + + IL_000d: ldc.i4.m1 + IL_000e: ret + + IL_000f: ldc.i4.0 + IL_0010: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any '<>f__AnonymousType4214685905`0' + IL_0007: tail. + IL_0009: callvirt instance int32 '<>f__AnonymousType4214685905`0'::CompareTo(class '<>f__AnonymousType4214685905`0') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (class '<>f__AnonymousType4214685905`0' V_0, + class '<>f__AnonymousType4214685905`0' V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any '<>f__AnonymousType4214685905`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_0018 + + IL_000c: ldarg.1 + IL_000d: unbox.any '<>f__AnonymousType4214685905`0' + IL_0012: brfalse.s IL_0016 + + IL_0014: ldc.i4.0 + IL_0015: ret + + IL_0016: ldc.i4.1 + IL_0017: ret + + IL_0018: ldarg.1 + IL_0019: unbox.any '<>f__AnonymousType4214685905`0' + IL_001e: brfalse.s IL_0022 + + IL_0020: ldc.i4.m1 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0007 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldloc.0 + IL_0006: ret + + IL_0007: ldc.i4.0 + IL_0008: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 '<>f__AnonymousType4214685905`0'::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType4214685905`0' obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType4214685905`0' V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000a + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldc.i4.1 + IL_0009: ret + + IL_000a: ldc.i4.0 + IL_000b: ret + + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType4214685905`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType4214685905`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool '<>f__AnonymousType4214685905`0'::Equals(class '<>f__AnonymousType4214685905`0', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType4214685905`0' obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_000a + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 + + IL_0006: ldc.i4.1 + IL_0007: ret + + IL_0008: ldc.i4.0 + IL_0009: ret + + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: ldc.i4.0 + IL_000f: ceq + IL_0011: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType4214685905`0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>f__AnonymousType4214685905`0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool '<>f__AnonymousType4214685905`0'::Equals(class '<>f__AnonymousType4214685905`0') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType3065250744`1'<'j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType3065250744`1'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType3065250744`1'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 33 30 36 35 32 35 30 + 37 34 34 60 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_000d: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType3065250744`1'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType3065250744`1'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType3065250744`1'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType3065250744`1'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType3065250744`1'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0021 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001f + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_0017: tail. + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001e: ret + + IL_001f: ldc.i4.1 + IL_0020: ret + + IL_0021: ldarg.1 + IL_0022: brfalse.s IL_0026 + + IL_0024: ldc.i4.m1 + IL_0025: ret + + IL_0026: ldc.i4.0 + IL_0027: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType3065250744`1'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType3065250744`1'j__TPar'>::CompareTo(class '<>f__AnonymousType3065250744`1') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3065250744`1'j__TPar'> V_0, + class '<>f__AnonymousType3065250744`1'j__TPar'> V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType3065250744`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_002b + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType3065250744`1'j__TPar'> + IL_0012: brfalse.s IL_0029 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_0021: tail. + IL_0023: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0028: ret + + IL_0029: ldc.i4.1 + IL_002a: ret + + IL_002b: ldarg.1 + IL_002c: unbox.any class '<>f__AnonymousType3065250744`1'j__TPar'> + IL_0031: brfalse.s IL_0035 + + IL_0033: ldc.i4.m1 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0022 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType3065250744`1'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType3065250744`1'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3065250744`1'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001f + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001d + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_0015: tail. + IL_0017: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001c: ret + + IL_001d: ldc.i4.0 + IL_001e: ret + + IL_001f: ldarg.1 + IL_0020: ldnull + IL_0021: cgt.un + IL_0023: ldc.i4.0 + IL_0024: ceq + IL_0026: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3065250744`1'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3065250744`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType3065250744`1'j__TPar'>::Equals(class '<>f__AnonymousType3065250744`1', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType3065250744`1'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001a + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType3065250744`1'j__TPar'>::A@ + IL_0012: tail. + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0019: ret + + IL_001a: ldc.i4.0 + IL_001b: ret + + IL_001c: ldarg.1 + IL_001d: ldnull + IL_001e: cgt.un + IL_0020: ldc.i4.0 + IL_0021: ceq + IL_0023: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType3065250744`1'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3065250744`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType3065250744`1'j__TPar'>::Equals(class '<>f__AnonymousType3065250744`1') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3065250744`1'::get_A() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExplicitShadowsSpread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExplicitShadowsSpread.fs new file mode 100644 index 00000000000..de6714a5f49 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExplicitShadowsSpread.fs @@ -0,0 +1,5 @@ +[] +type R1 = { A : int; B : int } + +let r1 = { A = 1; B = 2 } +let r1' = { ...r1; A = 99 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExplicitShadowsSpread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExplicitShadowsSpread.fs.il.bsl new file mode 100644 index 00000000000..c671b85f586 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExplicitShadowsSpread.fs.il.bsl @@ -0,0 +1,203 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2B 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 45 78 70 6C 69 63 + 69 74 53 68 61 64 6F 77 73 53 70 72 65 61 64 2B + 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .field static assembly class assembly/R1 r1@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R1 'r1\'@5' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R1 get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::r1@4 + IL_0005: ret + } + + .method public specialname static class assembly/R1 'get_r1\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::'r1\'@5' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_0007: stsfld class assembly/R1 assembly::r1@4 + IL_000c: ldc.i4.s 99 + IL_000e: call class assembly/R1 assembly::get_r1() + IL_0013: ldfld int32 assembly/R1::B@ + IL_0018: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_001d: stsfld class assembly/R1 assembly::'r1\'@5' + IL_0022: ret + } + + .property class assembly/R1 + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_r1() + } + .property class assembly/R1 + 'r1\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::'get_r1\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExtraFieldsAreIgnored.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExtraFieldsAreIgnored.fs new file mode 100644 index 00000000000..1aa3c943d0f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExtraFieldsAreIgnored.fs @@ -0,0 +1,7 @@ +[] +type R1 = { A : int; B : int; C : int } +[] +type R2 = { B : int } + +let r1 = { A = 1; B = 2; C = 3 } +let r2 : R2 = { ...r1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExtraFieldsAreIgnored.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExtraFieldsAreIgnored.fs.il.bsl new file mode 100644 index 00000000000..b094774e1d0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_ExtraFieldsAreIgnored.fs.il.bsl @@ -0,0 +1,288 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::C@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2B 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 45 78 74 72 61 46 + 69 65 6C 64 73 41 72 65 49 67 6E 6F 72 65 64 2B + 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R1::C@ + IL_001b: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_C() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2B 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 45 78 74 72 61 46 + 69 65 6C 64 73 41 72 65 49 67 6E 6F 72 65 64 2B + 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::B@ + IL_000d: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + } + + .field static assembly class assembly/R1 r1@6 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R2 r2@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R1 get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::r1@6 + IL_0005: ret + } + + .method public specialname static class assembly/R2 get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::r2@7 + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: ldc.i4.3 + IL_0003: newobj instance void assembly/R1::.ctor(int32, + int32, + int32) + IL_0008: stsfld class assembly/R1 assembly::r1@6 + IL_000d: call class assembly/R1 assembly::get_r1() + IL_0012: ldfld int32 assembly/R1::B@ + IL_0017: newobj instance void assembly/R2::.ctor(int32) + IL_001c: stsfld class assembly/R2 assembly::r2@7 + IL_0021: ret + } + + .property class assembly/R1 + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_r1() + } + .property class assembly/R2 + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::get_r2() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Explicit_Spread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Explicit_Spread.fs new file mode 100644 index 00000000000..c92490f515c --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Explicit_Spread.fs @@ -0,0 +1,10 @@ +[] +type R1 = { B : int; C : int } +[] +type R2 = { A : int; B : int; C : int } + +let r1 = { B = 1; C = 2 } +let r2 = { A = 3; ...r1 } + +let r1' = {| B = 1; C = 2 |} +let r2' = { A = 3; ...r1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Explicit_Spread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Explicit_Spread.fs.il.bsl new file mode 100644 index 00000000000..3ced74dfbc2 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Explicit_Spread.fs.il.bsl @@ -0,0 +1,783 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::C@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 b, int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2F 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 45 78 70 6C 69 63 69 74 5F 53 70 72 + 65 61 64 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::B@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::C@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_C() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2F 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 45 78 70 6C 69 63 69 74 5F 53 70 72 + 65 61 64 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R2::C@ + IL_001b: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + } + + .field static assembly class assembly/R1 r1@6 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R2 r2@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1887057234`2' 'r1\'@9' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R2 'r2\'@10' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R1 get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::r1@6 + IL_0005: ret + } + + .method public specialname static class assembly/R2 get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::r2@7 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1887057234`2' 'get_r1\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1887057234`2' assembly::'r1\'@9' + IL_0005: ret + } + + .method public specialname static class assembly/R2 'get_r2\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::'r2\'@10' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_0007: stsfld class assembly/R1 assembly::r1@6 + IL_000c: ldc.i4.3 + IL_000d: call class assembly/R1 assembly::get_r1() + IL_0012: ldfld int32 assembly/R1::B@ + IL_0017: call class assembly/R1 assembly::get_r1() + IL_001c: ldfld int32 assembly/R1::C@ + IL_0021: newobj instance void assembly/R2::.ctor(int32, + int32, + int32) + IL_0026: stsfld class assembly/R2 assembly::r2@7 + IL_002b: ldc.i4.1 + IL_002c: ldc.i4.2 + IL_002d: newobj instance void class '<>f__AnonymousType1887057234`2'::.ctor(!0, + !1) + IL_0032: stsfld class '<>f__AnonymousType1887057234`2' assembly::'r1\'@9' + IL_0037: ldc.i4.3 + IL_0038: call class assembly/R1 assembly::get_r1() + IL_003d: ldfld int32 assembly/R1::B@ + IL_0042: call class assembly/R1 assembly::get_r1() + IL_0047: ldfld int32 assembly/R1::C@ + IL_004c: newobj instance void assembly/R2::.ctor(int32, + int32, + int32) + IL_0051: stsfld class assembly/R2 assembly::'r2\'@10' + IL_0056: ret + } + + .property class assembly/R1 + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_r1() + } + .property class assembly/R2 + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::get_r2() + } + .property class '<>f__AnonymousType1887057234`2' + 'r1\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1887057234`2' assembly::'get_r1\''() + } + .property class assembly/R2 + 'r2\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::'get_r2\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1887057234`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' B, !'j__TPar' C) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 38 38 37 30 35 37 + 32 33 34 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1887057234`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1887057234`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1887057234`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::B@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::C@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1887057234`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1887057234`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1887057234`2'::get_B() + } + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1887057234`2'::get_C() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_SpreadFromAnon.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_SpreadFromAnon.fs new file mode 100644 index 00000000000..8da3238197f --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_SpreadFromAnon.fs @@ -0,0 +1,4 @@ +[] +type R2 = { A : int; B : int; C : int } + +let r2 = { ...{| A = 1; B = 2 |}; C = 3 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_SpreadFromAnon.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_SpreadFromAnon.fs.il.bsl new file mode 100644 index 00000000000..b4ea16be473 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_SpreadFromAnon.fs.il.bsl @@ -0,0 +1,655 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2E 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 53 70 72 65 61 64 46 72 6F 6D 41 6E + 6F 6E 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R2::C@ + IL_001b: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + } + + .field static assembly class assembly/R2 r2@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R2 spreadSrc@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R2 get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::r2@4 + IL_0005: ret + } + + .method assembly specialname static class assembly/R2 get_spreadSrc@4() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::spreadSrc@4 + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void class '<>f__AnonymousType1960999945`2'::.ctor(!0, + !1) + IL_0007: stsfld class assembly/R2 assembly::spreadSrc@4 + IL_000c: call class assembly/R2 assembly::get_spreadSrc@4() + IL_0011: call instance !0 class '<>f__AnonymousType1960999945`2'::get_A() + IL_0016: call class assembly/R2 assembly::get_spreadSrc@4() + IL_001b: call instance !1 class '<>f__AnonymousType1960999945`2'::get_B() + IL_0020: ldc.i4.3 + IL_0021: newobj instance void assembly/R2::.ctor(int32, + int32, + int32) + IL_0026: stsfld class assembly/R2 assembly::r2@4 + IL_002b: ret + } + + .property class assembly/R2 + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::get_r2() + } + .property class assembly/R2 + spreadSrc@4() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::get_spreadSrc@4() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1960999945`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 39 36 30 39 39 39 + 39 34 35 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1960999945`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1960999945`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1960999945`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1960999945`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1960999945`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1960999945`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1960999945`2'::get_B() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Explicit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Explicit.fs new file mode 100644 index 00000000000..b192db293b1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Explicit.fs @@ -0,0 +1,10 @@ +[] +type R1 = { A : int; B : int } +[] +type R2 = { A : int; B : int; C : int } + +let r1 = { A = 1; B = 2 } +let r2 = { ...r1; C = 3 } + +let r1' = {| A = 1; B = 2 |} +let r2' = { ...r1; C = 3 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Explicit.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Explicit.fs.il.bsl new file mode 100644 index 00000000000..1059d5b5d76 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Explicit.fs.il.bsl @@ -0,0 +1,783 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2F 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 53 70 72 65 61 64 5F 45 78 70 6C 69 + 63 69 74 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2F 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 53 70 72 65 61 64 5F 45 78 70 6C 69 + 63 69 74 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R2::C@ + IL_001b: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + } + + .field static assembly class assembly/R1 r1@6 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R2 r2@7 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType1701169138`2' 'r1\'@9' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R2 'r2\'@10' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R1 get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::r1@6 + IL_0005: ret + } + + .method public specialname static class assembly/R2 get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::r2@7 + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType1701169138`2' 'get_r1\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType1701169138`2' assembly::'r1\'@9' + IL_0005: ret + } + + .method public specialname static class assembly/R2 'get_r2\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::'r2\'@10' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 5 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_0007: stsfld class assembly/R1 assembly::r1@6 + IL_000c: call class assembly/R1 assembly::get_r1() + IL_0011: ldfld int32 assembly/R1::A@ + IL_0016: call class assembly/R1 assembly::get_r1() + IL_001b: ldfld int32 assembly/R1::B@ + IL_0020: ldc.i4.3 + IL_0021: newobj instance void assembly/R2::.ctor(int32, + int32, + int32) + IL_0026: stsfld class assembly/R2 assembly::r2@7 + IL_002b: ldc.i4.1 + IL_002c: ldc.i4.2 + IL_002d: newobj instance void class '<>f__AnonymousType1701169138`2'::.ctor(!0, + !1) + IL_0032: stsfld class '<>f__AnonymousType1701169138`2' assembly::'r1\'@9' + IL_0037: call class assembly/R1 assembly::get_r1() + IL_003c: ldfld int32 assembly/R1::A@ + IL_0041: call class assembly/R1 assembly::get_r1() + IL_0046: ldfld int32 assembly/R1::B@ + IL_004b: ldc.i4.3 + IL_004c: newobj instance void assembly/R2::.ctor(int32, + int32, + int32) + IL_0051: stsfld class assembly/R2 assembly::'r2\'@10' + IL_0056: ret + } + + .property class assembly/R1 + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_r1() + } + .property class assembly/R2 + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::get_r2() + } + .property class '<>f__AnonymousType1701169138`2' + 'r1\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType1701169138`2' assembly::'get_r1\''() + } + .property class assembly/R2 + 'r2\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::'get_r2\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1701169138`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 37 30 31 31 36 39 + 31 33 38 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1701169138`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType1701169138`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1701169138`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1701169138`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType1701169138`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1701169138`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1701169138`2'::get_B() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Spread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Spread.fs new file mode 100644 index 00000000000..b6930889352 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Spread.fs @@ -0,0 +1,16 @@ +[] +type R1 = { A : int; B : int } +[] +type R2 = { C : int; D : int } +[] +type R3 = { A : int; B : int; C : int; D : int } + +let r1 = { A = 1; B = 2 } +let r2 = { C = 3; D = 4 } +let r3 = { ...r1; ...r2 } +let r3' = { ...r2; ...r3 } + +let r1' = {| A = 1; B = 2 |} +let r2' = {| C = 3; D = 4 |} +let r3'' = { ...r1; ...r2 } +let r3''' = { ...r2; ...r3 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Spread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Spread.fs.il.bsl new file mode 100644 index 00000000000..57dcc4e885e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_NoOverlap_Spread_Spread.fs.il.bsl @@ -0,0 +1,1420 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2D 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 53 70 72 65 61 64 5F 53 70 72 65 61 + 64 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::D@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 c, int32 d) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2D 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 53 70 72 65 61 64 5F 53 70 72 65 61 + 64 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::C@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::D@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + .property instance int32 D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_D() + } + } + + .class auto ansi serializable sealed nested public R3 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::D@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c, + int32 d) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2D 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 4E 6F 4F 76 65 72 + 6C 61 70 5F 53 70 72 65 61 64 5F 53 70 72 65 61 + 64 2B 52 33 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R3::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R3::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R3::C@ + IL_001b: ldarg.0 + IL_001c: ldarg.s d + IL_001e: stfld int32 assembly/R3::D@ + IL_0023: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R3>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_C() + } + .property instance int32 D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_D() + } + } + + .field static assembly class assembly/R1 r1@8 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R2 r2@9 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R3 r3@10 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R3 'r3\'@11' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType3917092570`2' 'r1\'@13' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class '<>f__AnonymousType4292577119`2' 'r2\'@14' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R3 'r3\'\'@15' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R3 'r3\'\'\'@16' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R1 get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::r1@8 + IL_0005: ret + } + + .method public specialname static class assembly/R2 get_r2() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R2 assembly::r2@9 + IL_0005: ret + } + + .method public specialname static class assembly/R3 get_r3() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R3 assembly::r3@10 + IL_0005: ret + } + + .method public specialname static class assembly/R3 'get_r3\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R3 assembly::'r3\'@11' + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType3917092570`2' 'get_r1\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType3917092570`2' assembly::'r1\'@13' + IL_0005: ret + } + + .method public specialname static class '<>f__AnonymousType4292577119`2' 'get_r2\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class '<>f__AnonymousType4292577119`2' assembly::'r2\'@14' + IL_0005: ret + } + + .method public specialname static class assembly/R3 'get_r3\'\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R3 assembly::'r3\'\'@15' + IL_0005: ret + } + + .method public specialname static class assembly/R3 'get_r3\'\'\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R3 assembly::'r3\'\'\'@16' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 6 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_0007: stsfld class assembly/R1 assembly::r1@8 + IL_000c: ldc.i4.3 + IL_000d: ldc.i4.4 + IL_000e: newobj instance void assembly/R2::.ctor(int32, + int32) + IL_0013: stsfld class assembly/R2 assembly::r2@9 + IL_0018: call class assembly/R1 assembly::get_r1() + IL_001d: ldfld int32 assembly/R1::A@ + IL_0022: call class assembly/R1 assembly::get_r1() + IL_0027: ldfld int32 assembly/R1::B@ + IL_002c: call class assembly/R2 assembly::get_r2() + IL_0031: ldfld int32 assembly/R2::C@ + IL_0036: call class assembly/R2 assembly::get_r2() + IL_003b: ldfld int32 assembly/R2::D@ + IL_0040: newobj instance void assembly/R3::.ctor(int32, + int32, + int32, + int32) + IL_0045: stsfld class assembly/R3 assembly::r3@10 + IL_004a: call class assembly/R3 assembly::get_r3() + IL_004f: ldfld int32 assembly/R3::A@ + IL_0054: call class assembly/R3 assembly::get_r3() + IL_0059: ldfld int32 assembly/R3::B@ + IL_005e: call class assembly/R3 assembly::get_r3() + IL_0063: ldfld int32 assembly/R3::C@ + IL_0068: call class assembly/R3 assembly::get_r3() + IL_006d: ldfld int32 assembly/R3::D@ + IL_0072: newobj instance void assembly/R3::.ctor(int32, + int32, + int32, + int32) + IL_0077: stsfld class assembly/R3 assembly::'r3\'@11' + IL_007c: ldc.i4.1 + IL_007d: ldc.i4.2 + IL_007e: newobj instance void class '<>f__AnonymousType3917092570`2'::.ctor(!0, + !1) + IL_0083: stsfld class '<>f__AnonymousType3917092570`2' assembly::'r1\'@13' + IL_0088: ldc.i4.3 + IL_0089: ldc.i4.4 + IL_008a: newobj instance void class '<>f__AnonymousType4292577119`2'::.ctor(!0, + !1) + IL_008f: stsfld class '<>f__AnonymousType4292577119`2' assembly::'r2\'@14' + IL_0094: call class assembly/R1 assembly::get_r1() + IL_0099: ldfld int32 assembly/R1::A@ + IL_009e: call class assembly/R1 assembly::get_r1() + IL_00a3: ldfld int32 assembly/R1::B@ + IL_00a8: call class assembly/R2 assembly::get_r2() + IL_00ad: ldfld int32 assembly/R2::C@ + IL_00b2: call class assembly/R2 assembly::get_r2() + IL_00b7: ldfld int32 assembly/R2::D@ + IL_00bc: newobj instance void assembly/R3::.ctor(int32, + int32, + int32, + int32) + IL_00c1: stsfld class assembly/R3 assembly::'r3\'\'@15' + IL_00c6: call class assembly/R3 assembly::get_r3() + IL_00cb: ldfld int32 assembly/R3::A@ + IL_00d0: call class assembly/R3 assembly::get_r3() + IL_00d5: ldfld int32 assembly/R3::B@ + IL_00da: call class assembly/R3 assembly::get_r3() + IL_00df: ldfld int32 assembly/R3::C@ + IL_00e4: call class assembly/R3 assembly::get_r3() + IL_00e9: ldfld int32 assembly/R3::D@ + IL_00ee: newobj instance void assembly/R3::.ctor(int32, + int32, + int32, + int32) + IL_00f3: stsfld class assembly/R3 assembly::'r3\'\'\'@16' + IL_00f8: ret + } + + .property class assembly/R1 + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_r1() + } + .property class assembly/R2 + r2() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R2 assembly::get_r2() + } + .property class assembly/R3 + r3() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R3 assembly::get_r3() + } + .property class assembly/R3 + 'r3\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R3 assembly::'get_r3\''() + } + .property class '<>f__AnonymousType3917092570`2' + 'r1\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType3917092570`2' assembly::'get_r1\''() + } + .property class '<>f__AnonymousType4292577119`2' + 'r2\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class '<>f__AnonymousType4292577119`2' assembly::'get_r2\''() + } + .property class assembly/R3 + 'r3\'\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R3 assembly::'get_r3\'\''() + } + .property class assembly/R3 + 'r3\'\'\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R3 assembly::'get_r3\'\'\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType4292577119`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' C, !'j__TPar' D) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 34 32 39 32 35 37 37 + 31 31 39 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType4292577119`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType4292577119`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType4292577119`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::C@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::D@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType4292577119`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType4292577119`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType4292577119`2'::get_C() + } + .property instance !'j__TPar' D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType4292577119`2'::get_D() + } +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType3917092570`2'<'j__TPar','j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private !'j__TPar' B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A, !'j__TPar' B) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 33 39 31 37 30 39 32 + 35 37 30 60 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0014: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType3917092570`2'j__TPar',!'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0044 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 + + IL_0021: ldloc.0 + IL_0022: ret + + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret + + IL_0029: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 + IL_0035: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0041: ret + + IL_0042: ldc.i4.1 + IL_0043: ret + + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 + + IL_0047: ldc.i4.m1 + IL_0048: ret + + IL_0049: ldc.i4.0 + IL_004a: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::CompareTo(class '<>f__AnonymousType3917092570`2') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> V_0, + class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_004a + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0026: stloc.2 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d + + IL_002b: ldloc.2 + IL_002c: ret + + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 + + IL_0031: ldloc.2 + IL_0032: ret + + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 + IL_003b: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0047: ret + + IL_0048: ldc.i4.1 + IL_0049: ret + + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 + + IL_0052: ldc.i4.m1 + IL_0053: ret + + IL_0054: ldc.i4.0 + IL_0055: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_003d + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl + IL_0034: ldloc.0 + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret + + IL_003d: ldc.i4.0 + IL_003e: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0035 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0033 + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_0015: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001a: brfalse.s IL_0031 + + IL_001c: ldarg.2 + IL_001d: ldarg.0 + IL_001e: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0023: ldloc.0 + IL_0024: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0029: tail. + IL_002b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_0030: ret + + IL_0031: ldc.i4.0 + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldarg.1 + IL_0036: ldnull + IL_0037: cgt.un + IL_0039: ldc.i4.0 + IL_003a: ceq + IL_003c: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3917092570`2', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0031 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::A@ + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0017: brfalse.s IL_002d + + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 + IL_0020: ldfld !1 class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::B@ + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_002c: ret + + IL_002d: ldc.i4.0 + IL_002e: ret + + IL_002f: ldc.i4.0 + IL_0030: ret + + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType3917092570`2'j__TPar',!'j__TPar'>::Equals(class '<>f__AnonymousType3917092570`2') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3917092570`2'::get_A() + } + .property instance !'j__TPar' B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType3917092570`2'::get_B() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsExplicit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsExplicit.fs new file mode 100644 index 00000000000..f4493a6b47b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsExplicit.fs @@ -0,0 +1,5 @@ +[] +type R1 = { A : int; B : int } + +let r1 = { A = 1; B = 2 } +let r1' = { A = 0; ...r1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsExplicit.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsExplicit.fs.il.bsl new file mode 100644 index 00000000000..1cba10bfe00 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsExplicit.fs.il.bsl @@ -0,0 +1,204 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 2B 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 53 70 72 65 61 64 + 53 68 61 64 6F 77 73 45 78 70 6C 69 63 69 74 2B + 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .field static assembly class assembly/R1 r1@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R1 'r1\'@5' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R1 get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::r1@4 + IL_0005: ret + } + + .method public specialname static class assembly/R1 'get_r1\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::'r1\'@5' + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_0007: stsfld class assembly/R1 assembly::r1@4 + IL_000c: call class assembly/R1 assembly::get_r1() + IL_0011: ldfld int32 assembly/R1::A@ + IL_0016: call class assembly/R1 assembly::get_r1() + IL_001b: ldfld int32 assembly/R1::B@ + IL_0020: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_0025: stsfld class assembly/R1 assembly::'r1\'@5' + IL_002a: ret + } + + .property class assembly/R1 + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_r1() + } + .property class assembly/R1 + 'r1\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::'get_r1\''() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsSpread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsSpread.fs new file mode 100644 index 00000000000..08df2f63e02 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsSpread.fs @@ -0,0 +1,5 @@ +[] +type R1 = { A : int; B : int } + +let r1 = { A = 1; B = 2 } +let r1' = { ...r1; ...{| A = 99 |} } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsSpread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsSpread.fs.il.bsl new file mode 100644 index 00000000000..9a321d16de0 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Expression_Nominal_SpreadShadowsSpread.fs.il.bsl @@ -0,0 +1,552 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 29 45 78 70 72 65 73 73 69 6F + 6E 5F 4E 6F 6D 69 6E 61 6C 5F 53 70 72 65 61 64 + 53 68 61 64 6F 77 73 53 70 72 65 61 64 2B 52 31 + 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .field static assembly class assembly/R1 r1@4 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R1 'r1\'@5' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly class assembly/R1 spreadSrc@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field static assembly int32 B@5 + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname static class assembly/R1 get_r1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::r1@4 + IL_0005: ret + } + + .method public specialname static class assembly/R1 'get_r1\''() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::'r1\'@5' + IL_0005: ret + } + + .method assembly specialname static class assembly/R1 get_spreadSrc@5() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class assembly/R1 assembly::spreadSrc@5 + IL_0005: ret + } + + .method assembly specialname static int32 get_B@5() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 assembly::B@5 + IL_0005: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 4 + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_0007: stsfld class assembly/R1 assembly::r1@4 + IL_000c: ldc.i4.s 99 + IL_000e: newobj instance void class '<>f__AnonymousType1722350077`1'::.ctor(!0) + IL_0013: stsfld class assembly/R1 assembly::spreadSrc@5 + IL_0018: call class assembly/R1 assembly::get_r1() + IL_001d: ldfld int32 assembly/R1::B@ + IL_0022: stsfld int32 assembly::B@5 + IL_0027: call class assembly/R1 assembly::get_spreadSrc@5() + IL_002c: call instance !0 class '<>f__AnonymousType1722350077`1'::get_A() + IL_0031: call int32 assembly::get_B@5() + IL_0036: newobj instance void assembly/R1::.ctor(int32, + int32) + IL_003b: stsfld class assembly/R1 assembly::'r1\'@5' + IL_0040: ret + } + + .property class assembly/R1 + r1() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_r1() + } + .property class assembly/R1 + 'r1\''() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::'get_r1\''() + } + .property class assembly/R1 + spreadSrc@5() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class assembly/R1 assembly::get_spreadSrc@5() + } + .property int32 B@5() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get int32 assembly::get_B@5() + } +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .field static assembly int32 init@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: call void assembly::staticInitialization@() + IL_0005: ret + } + +} + +.class public auto ansi serializable sealed beforefieldinit '<>f__AnonymousType1722350077`1'<'j__TPar'> + extends [runtime]System.Object + implements [runtime]System.Collections.IStructuralComparable, + [runtime]System.IComparable, + class [runtime]System.IComparable`1f__AnonymousType1722350077`1'j__TPar'>>, + [runtime]System.Collections.IStructuralEquatable, + class [runtime]System.IEquatable`1f__AnonymousType1722350077`1'j__TPar'>> +{ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field private !'j__TPar' A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor(!'j__TPar' A) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1E 3C 3E 66 5F 5F 41 6E 6F 6E + 79 6D 6F 75 73 54 79 70 65 31 37 32 32 33 35 30 + 30 37 37 60 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_000d: ret + } + + .method public hidebysig specialname instance !'j__TPar' get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_0006: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5f__AnonymousType1722350077`1'j__TPar'>,string>,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class '<>f__AnonymousType1722350077`1'j__TPar'>>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToStringf__AnonymousType1722350077`1'j__TPar'>,string>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2f__AnonymousType1722350077`1'j__TPar'>,string>::Invoke(!0) + IL_0015: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(class '<>f__AnonymousType1722350077`1'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0021 + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001f + + IL_0006: call class [runtime]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_0011: ldarg.1 + IL_0012: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_0017: tail. + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_001e: ret + + IL_001f: ldc.i4.1 + IL_0020: ret + + IL_0021: ldarg.1 + IL_0022: brfalse.s IL_0026 + + IL_0024: ldc.i4.m1 + IL_0025: ret + + IL_0026: ldc.i4.0 + IL_0027: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: unbox.any class '<>f__AnonymousType1722350077`1'j__TPar'> + IL_0007: tail. + IL_0009: callvirt instance int32 class '<>f__AnonymousType1722350077`1'j__TPar'>::CompareTo(class '<>f__AnonymousType1722350077`1') + IL_000e: ret + } + + .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1722350077`1'j__TPar'> V_0, + class '<>f__AnonymousType1722350077`1'j__TPar'> V_1) + IL_0000: ldarg.1 + IL_0001: unbox.any class '<>f__AnonymousType1722350077`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: stloc.1 + IL_0009: ldarg.0 + IL_000a: brfalse.s IL_002b + + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1722350077`1'j__TPar'> + IL_0012: brfalse.s IL_0029 + + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_001b: ldloc.1 + IL_001c: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_0021: tail. + IL_0023: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [runtime]System.Collections.IComparer, + !!0, + !!0) + IL_0028: ret + + IL_0029: ldc.i4.1 + IL_002a: ret + + IL_002b: ldarg.1 + IL_002c: unbox.any class '<>f__AnonymousType1722350077`1'j__TPar'> + IL_0031: brfalse.s IL_0035 + + IL_0033: ldc.i4.m1 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0022 + + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ret + + IL_0022: ldc.i4.0 + IL_0023: ret + } + + .method public hidebysig virtual final instance int32 GetHashCode() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0006: tail. + IL_0008: callvirt instance int32 class '<>f__AnonymousType1722350077`1'j__TPar'>::GetHashCode(class [runtime]System.Collections.IEqualityComparer) + IL_000d: ret + } + + .method public hidebysig instance bool Equals(class '<>f__AnonymousType1722350077`1'j__TPar'> obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1722350077`1'j__TPar'> V_0) + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001f + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001d + + IL_0006: ldarg.1 + IL_0007: stloc.0 + IL_0008: ldarg.2 + IL_0009: ldarg.0 + IL_000a: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_000f: ldloc.0 + IL_0010: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_0015: tail. + IL_0017: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [runtime]System.Collections.IEqualityComparer, + !!0, + !!0) + IL_001c: ret + + IL_001d: ldc.i4.0 + IL_001e: ret + + IL_001f: ldarg.1 + IL_0020: ldnull + IL_0021: cgt.un + IL_0023: ldc.i4.0 + IL_0024: ceq + IL_0026: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 5 + .locals init (class '<>f__AnonymousType1722350077`1'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1722350077`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0015 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: ldarg.2 + IL_000d: tail. + IL_000f: callvirt instance bool class '<>f__AnonymousType1722350077`1'j__TPar'>::Equals(class '<>f__AnonymousType1722350077`1', + class [runtime]System.Collections.IEqualityComparer) + IL_0014: ret + + IL_0015: ldc.i4.0 + IL_0016: ret + } + + .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1722350077`1'j__TPar'> obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_001c + + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001a + + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_000c: ldarg.1 + IL_000d: ldfld !0 class '<>f__AnonymousType1722350077`1'j__TPar'>::A@ + IL_0012: tail. + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + !!0) + IL_0019: ret + + IL_001a: ldc.i4.0 + IL_001b: ret + + IL_001c: ldarg.1 + IL_001d: ldnull + IL_001e: cgt.un + IL_0020: ldc.i4.0 + IL_0021: ceq + IL_0023: ret + } + + .method public hidebysig virtual final instance bool Equals(object obj) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 4 + .locals init (class '<>f__AnonymousType1722350077`1'j__TPar'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>f__AnonymousType1722350077`1'j__TPar'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0014 + + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: tail. + IL_000e: callvirt instance bool class '<>f__AnonymousType1722350077`1'j__TPar'>::Equals(class '<>f__AnonymousType1722350077`1') + IL_0013: ret + + IL_0014: ldc.i4.0 + IL_0015: ret + } + + .property instance !'j__TPar' A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance !'j__TPar' '<>f__AnonymousType1722350077`1'::get_A() + } +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/NominalRecordExpressionSpreads.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/NominalRecordExpressionSpreads.fs new file mode 100644 index 00000000000..6795ad6f5ec --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/NominalRecordExpressionSpreads.fs @@ -0,0 +1,71 @@ +module EmittedIL.NominalRecordExpressionSpreads + +open FSharp.Test +open FSharp.Test.Compiler + +/// Various types in the System.Diagnostics.CodeAnalysis namespace will be generated by the compiler +/// for the Framework target but will be included in the runtime for the .NET (Core) target. +/// Since the only IL that is material here is the field names, types, and ordering, +/// and since the spread logic is entirely framework/runtime-agnostic, +/// it is simpler to run these tests only for the .NET (Core) target. +type TheoryAttribute = TheoryForNETCOREAPPAttribute + +let [] SupportedLangVersion = "preview" + +let verifyCompilation compilation = + compilation + |> withLangVersion SupportedLangVersion + |> asExe + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> compile + |> verifyILBaseline + +[] +let Expression_Nominal_ExplicitShadowsSpread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Nominal_ExtraFieldsAreIgnored_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Nominal_NoOverlap_Explicit_Spread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Nominal_NoOverlap_Spread_Explicit_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Nominal_NoOverlap_Spread_Spread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Nominal_NoOverlap_SpreadFromAnon_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Nominal_SpreadShadowsExplicit_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Expression_Nominal_SpreadShadowsSpread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/RecordTypeSpreads.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/RecordTypeSpreads.fs new file mode 100644 index 00000000000..f9b40721c5e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/RecordTypeSpreads.fs @@ -0,0 +1,71 @@ +module EmittedIL.RecordTypeSpreads + +open FSharp.Test +open FSharp.Test.Compiler + +/// Various types in the System.Diagnostics.CodeAnalysis namespace will be generated by the compiler +/// for the Framework target but will be included in the runtime for the .NET (Core) target. +/// Since the only IL that is material here is the field names, types, and ordering, +/// and since the spread logic is entirely framework/runtime-agnostic, +/// it is simpler to run these tests only for the .NET (Core) target. +type TheoryAttribute = TheoryForNETCOREAPPAttribute + +let [] SupportedLangVersion = "preview" + +let verifyCompilation compilation = + compilation + |> withLangVersion SupportedLangVersion + |> asExe + |> withEmbeddedPdb + |> withEmbedAllSource + |> ignoreWarnings + |> compile + |> verifyILBaseline + +[] +let Type_ExplicitShadowsSpread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Type_NoOverlap_Explicit_Spread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Type_NoOverlap_Spread_Explicit_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Type_NoOverlap_Spread_Spread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Type_NoOverlap_SpreadFromAnon_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Type_SpreadShadowsSpread_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Type_SpreadShadowsExplicit_fs compilation = + compilation + |> getCompilation + |> verifyCompilation + +[] +let Type_Type_AttributesAreShadowed_fs compilation = + compilation + |> getCompilation + |> verifyCompilation diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_AttributesAreShadowed.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_AttributesAreShadowed.fs new file mode 100644 index 00000000000..d2a2c6076ae --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_AttributesAreShadowed.fs @@ -0,0 +1,7 @@ +type Attr1Attribute () = inherit System.Attribute () +type Attr2Attribute () = inherit System.Attribute () + +[] +type R1 = { [] A : int; [] B : int } +[] +type R2 = { ...R1; [] A : string } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_AttributesAreShadowed.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_AttributesAreShadowed.fs.il.bsl new file mode 100644 index 00000000000..bbc6b8530b6 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_AttributesAreShadowed.fs.il.bsl @@ -0,0 +1,255 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable nested public Attr1Attribute + extends [runtime]System.Attribute + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .class auto ansi serializable nested public Attr2Attribute + extends [runtime]System.Attribute + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) + .method public specialname rtspecialname instance void .ctor() cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance void [runtime]System.Attribute::.ctor() + IL_0006: ldarg.0 + IL_0007: pop + IL_0008: ret + } + + } + + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 54 79 70 65 5F 41 74 74 72 + 69 62 75 74 65 73 41 72 65 53 68 61 64 6F 77 65 + 64 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void assembly/Attr1Attribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void assembly/Attr1Attribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly string A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/R2::A@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 b, string a) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 54 79 70 65 5F 41 74 74 72 + 69 62 75 74 65 73 41 72 65 53 68 61 64 6F 77 65 + 64 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::B@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld string assembly/R2::A@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 B() + { + .custom instance void assembly/Attr1Attribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance string A() + { + .custom instance void assembly/Attr2Attribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance string assembly/R2::get_A() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_ExplicitShadowsSpread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_ExplicitShadowsSpread.fs new file mode 100644 index 00000000000..48ce14dfbbd --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_ExplicitShadowsSpread.fs @@ -0,0 +1,4 @@ +[] +type R1 = { A : int; B : int } +[] +type R2 = { ...R1; A : string } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_ExplicitShadowsSpread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_ExplicitShadowsSpread.fs.il.bsl new file mode 100644 index 00000000000..712b79365d5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_ExplicitShadowsSpread.fs.il.bsl @@ -0,0 +1,217 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 54 79 70 65 5F 45 78 70 6C + 69 63 69 74 53 68 61 64 6F 77 73 53 70 72 65 61 + 64 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly string A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/R2::A@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 b, string a) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 54 79 70 65 5F 45 78 70 6C + 69 63 69 74 53 68 61 64 6F 77 73 53 70 72 65 61 + 64 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::B@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld string assembly/R2::A@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance string A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance string assembly/R2::get_A() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Explicit_Spread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Explicit_Spread.fs new file mode 100644 index 00000000000..bc667c62e2e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Explicit_Spread.fs @@ -0,0 +1,4 @@ +[] +type R1 = { B : int; C : int } +[] +type R2 = { A : int; ...R1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Explicit_Spread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Explicit_Spread.fs.il.bsl new file mode 100644 index 00000000000..4fc90ee19a3 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Explicit_Spread.fs.il.bsl @@ -0,0 +1,243 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::C@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 b, int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 21 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 45 78 70 6C 69 63 69 74 5F 53 + 70 72 65 61 64 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::B@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::C@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_C() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 21 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 45 78 70 6C 69 63 69 74 5F 53 + 70 72 65 61 64 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R2::C@ + IL_001b: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_SpreadFromAnon.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_SpreadFromAnon.fs new file mode 100644 index 00000000000..9c0f6e97ac9 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_SpreadFromAnon.fs @@ -0,0 +1,3 @@ +type R1 = {| A : int; B : int |} +[] +type R2 = { ...R1; C : int } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_SpreadFromAnon.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_SpreadFromAnon.fs.il.bsl new file mode 100644 index 00000000000..97fa4e04bc5 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_SpreadFromAnon.fs.il.bsl @@ -0,0 +1,162 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 20 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 53 70 72 65 61 64 46 72 6F 6D + 41 6E 6F 6E 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R2::C@ + IL_001b: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Explicit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Explicit.fs new file mode 100644 index 00000000000..c5da8718a02 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Explicit.fs @@ -0,0 +1,4 @@ +[] +type R1 = { A : int; B : int } +[] +type R2 = { ...R1; C : int } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Explicit.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Explicit.fs.il.bsl new file mode 100644 index 00000000000..f71df039f32 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Explicit.fs.il.bsl @@ -0,0 +1,243 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 21 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 53 70 72 65 61 64 5F 45 78 70 + 6C 69 63 69 74 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 21 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 53 70 72 65 61 64 5F 45 78 70 + 6C 69 63 69 74 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R2::C@ + IL_001b: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Spread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Spread.fs new file mode 100644 index 00000000000..447aa272308 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Spread.fs @@ -0,0 +1,8 @@ +[] +type R1 = { A : int; B : int } +[] +type R2 = { C : int; D : int } +[] +type R3 = { ...R1; ...R2 } +[] +type R4 = { ...R2; ...R1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Spread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Spread.fs.il.bsl new file mode 100644 index 00000000000..9998053a106 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_NoOverlap_Spread_Spread.fs.il.bsl @@ -0,0 +1,479 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1F 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 53 70 72 65 61 64 5F 53 70 72 + 65 61 64 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::D@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 c, int32 d) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1F 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 53 70 72 65 61 64 5F 53 70 72 + 65 61 64 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::C@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::D@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_C() + } + .property instance int32 D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_D() + } + } + + .class auto ansi serializable sealed nested public R3 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::D@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 a, + int32 b, + int32 c, + int32 d) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1F 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 53 70 72 65 61 64 5F 53 70 72 + 65 61 64 2B 52 33 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R3::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R3::B@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R3::C@ + IL_001b: ldarg.0 + IL_001c: ldarg.s d + IL_001e: stfld int32 assembly/R3::D@ + IL_0023: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R3>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_B() + } + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_C() + } + .property instance int32 D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_D() + } + } + + .class auto ansi serializable sealed nested public R4 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 C@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 D@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_C() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R4::C@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_D() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R4::D@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R4::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R4::B@ + IL_0006: ret + } + + .method public specialname rtspecialname + instance void .ctor(int32 c, + int32 d, + int32 a, + int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1F 54 79 70 65 5F 4E 6F 4F 76 + 65 72 6C 61 70 5F 53 70 72 65 61 64 5F 53 70 72 + 65 61 64 2B 52 34 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R4::C@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R4::D@ + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld int32 assembly/R4::A@ + IL_001b: ldarg.0 + IL_001c: ldarg.s b + IL_001e: stfld int32 assembly/R4::B@ + IL_0023: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R4>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 C() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R4::get_C() + } + .property instance int32 D() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R4::get_D() + } + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 02 00 00 00 00 00 ) + .get instance int32 assembly/R4::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 03 00 00 00 00 00 ) + .get instance int32 assembly/R4::get_B() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsExplicit.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsExplicit.fs new file mode 100644 index 00000000000..0a9e73ffa9d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsExplicit.fs @@ -0,0 +1,4 @@ +[] +type R1 = { A : int; B : int } +[] +type R2 = { A : string; ...R1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsExplicit.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsExplicit.fs.il.bsl new file mode 100644 index 00000000000..df5734beec4 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsExplicit.fs.il.bsl @@ -0,0 +1,217 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 54 79 70 65 5F 53 70 72 65 + 61 64 53 68 61 64 6F 77 73 45 78 70 6C 69 63 69 + 74 2B 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R2::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1D 54 79 70 65 5F 53 70 72 65 + 61 64 53 68 61 64 6F 77 73 45 78 70 6C 69 63 69 + 74 2B 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R2::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R2::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R2::get_B() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsSpread.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsSpread.fs new file mode 100644 index 00000000000..e4d65018f9e --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsSpread.fs @@ -0,0 +1,8 @@ +[] +type R1 = { A : int; B : int } +[] +type R2 = { A : string } +[] +type R3 = { ...R1; ...R2 } +[] +type R4 = { ...R2; ...R1 } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsSpread.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsSpread.fs.il.bsl new file mode 100644 index 00000000000..6e925ff053d --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Spreads/Type_SpreadShadowsSpread.fs.il.bsl @@ -0,0 +1,356 @@ + + + + + +.assembly extern runtime { } +.assembly extern FSharp.Core { } +.assembly assembly +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, + int32, + int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) + + + + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module assembly.exe + +.imagebase {value} +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 +.corflags 0x00000001 + + + + + +.class public abstract auto ansi sealed assembly + extends [runtime]System.Object +{ + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested public R1 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R1::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1B 54 79 70 65 5F 53 70 72 65 + 61 64 53 68 61 64 6F 77 73 53 70 72 65 61 64 2B + 52 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R1::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R1::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R1>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R1::get_B() + } + } + + .class auto ansi serializable sealed nested public R2 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly string A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance string get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/R2::A@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(string a) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1B 54 79 70 65 5F 53 70 72 65 + 61 64 53 68 61 64 6F 77 73 53 70 72 65 61 64 2B + 52 32 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld string assembly/R2::A@ + IL_000d: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R2>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance string A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance string assembly/R2::get_A() + } + } + + .class auto ansi serializable sealed nested public R3 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly string A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R3::B@ + IL_0006: ret + } + + .method public hidebysig specialname instance string get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld string assembly/R3::A@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 b, string a) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1B 54 79 70 65 5F 53 70 72 65 + 61 64 53 68 61 64 6F 77 73 53 70 72 65 61 64 2B + 52 33 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R3::B@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld string assembly/R3::A@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R3>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R3::get_B() + } + .property instance string A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance string assembly/R3::get_A() + } + } + + .class auto ansi serializable sealed nested public R4 + extends [runtime]System.Object + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.DefaultAugmentationAttribute::.ctor(bool) = ( 01 00 00 00 00 ) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 02 00 00 00 00 00 ) + .field assembly int32 A@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field assembly int32 B@ + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public hidebysig specialname instance int32 get_A() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R4::A@ + IL_0006: ret + } + + .method public hidebysig specialname instance int32 get_B() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/R4::B@ + IL_0006: ret + } + + .method public specialname rtspecialname instance void .ctor(int32 a, int32 b) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 1B 54 79 70 65 5F 53 70 72 65 + 61 64 53 68 61 64 6F 77 73 53 70 72 65 61 64 2B + 52 34 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/R4::A@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/R4::B@ + IL_0014: ret + } + + .method public strict virtual instance string ToString() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldstr "%+A" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/R4>::.ctor(string) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatToString>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_000f: ldarg.0 + IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0015: ret + } + + .property instance int32 A() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 00 00 00 00 00 00 ) + .get instance int32 assembly/R4::get_A() + } + .property instance int32 B() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 04 00 00 00 01 00 00 00 00 00 ) + .get instance int32 assembly/R4::get_B() + } + } + +} + +.class private abstract auto ansi sealed ''.$assembly + extends [runtime]System.Object +{ + .method public static void main@() cil managed + { + .entrypoint + + .maxstack 8 + IL_0000: ret + } + +} + + + + + + diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 8f5ace7aade..38161095fdb 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -185,6 +185,9 @@ + + + @@ -263,6 +266,7 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs index b579c8b0188..34aea06532d 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/CopyAndUpdateTests.fs @@ -1,4 +1,4 @@ -module Language.CopyAndUpdateTests +module Language.CopyAndUpdateTests open Xunit open FSharp.Test.Compiler @@ -17,7 +17,7 @@ let t2 x = { x with D.B = "a"; D.B = "b" } |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 6, Col 23, Line 6, Col 24, "The field 'B' appears multiple times in this record expression or pattern") + Error 668, Line 6, Col 34, Line 6, Col 41, "The field 'B' appears multiple times in this record expression or pattern" ] [] @@ -32,8 +32,8 @@ let t2 x = { x with D.B = "a"; D.B = "b"; D.B = "c" } |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 6, Col 23, Line 6, Col 24, "The field 'B' appears multiple times in this record expression or pattern") - (Error 668, Line 6, Col 34, Line 6, Col 35, "The field 'B' appears multiple times in this record expression or pattern") + Error 668, Line 6, Col 34, Line 6, Col 41, "The field 'B' appears multiple times in this record expression or pattern" + Error 668, Line 6, Col 45, Line 6, Col 52, "The field 'B' appears multiple times in this record expression or pattern" ] [] @@ -48,8 +48,8 @@ let t2 x = { x with D.B = "a"; D.C = ""; D.B = "c" ; D.C = "d" } |> typecheck |> shouldFail |> withDiagnostics [ - (Error 668, Line 6, Col 34, Line 6, Col 35, "The field 'C' appears multiple times in this record expression or pattern") - (Error 668, Line 6, Col 23, Line 6, Col 24, "The field 'B' appears multiple times in this record expression or pattern") + Error 668, Line 6, Col 44, Line 6, Col 51, "The field 'B' appears multiple times in this record expression or pattern" + Error 668, Line 6, Col 56, Line 6, Col 63, "The field 'C' appears multiple times in this record expression or pattern" ] [] diff --git a/tests/FSharp.Compiler.ComponentTests/Language/SpreadTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/SpreadTests.fs new file mode 100644 index 00000000000..17b9601dd76 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Language/SpreadTests.fs @@ -0,0 +1,1626 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +module Language.SpreadTests + +open FSharp.Test.Compiler +open Xunit + +module NominalAndAnonymousRecords = + let [] SupportedLangVersion = "preview" + + module LangVersion = + [] + let ``10 → error`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { ...R1; C : int } + let r1 = { A = 1; B = 2 } + let r2 = { ...r1; C = 3 } + """ + + FSharp src + |> withLangVersion10 + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3350, Line 3, Col 29, Line 3, Col 34, "Feature 'record type and expression spreads' is not available in F# 10.0. Please use language version 'PREVIEW' or greater." + Error 3350, Line 5, Col 28, Line 5, Col 33, "Feature 'record type and expression spreads' is not available in F# 10.0. Please use language version 'PREVIEW' or greater." + ] + + [] + let ``> 10 → success`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { ...R1; C : int } + let r1 = { A = 1; B = 2 } + let r2 = { ...r1; C = 3 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module Parsing = + [] + let ``{...} → error`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { ... } + let r1 : R1 = { ... } + let r2 = {| ... |} + let r1' : R1 = { r1 with ... } + let r2' = {| r1 with ... |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3885, Line 3, Col 29, Line 3, Col 32, "Missing spread source type after '...'." + Error 3884, Line 4, Col 33, Line 4, Col 36, "Missing spread source expression after '...'." + Error 3884, Line 5, Col 29, Line 5, Col 32, "Missing spread source expression after '...'." + Error 3884, Line 6, Col 42, Line 6, Col 45, "Missing spread source expression after '...'." + Error 3884, Line 7, Col 38, Line 7, Col 41, "Missing spread source expression after '...'." + ] + + module RecordTypeSpreads = + module Algebra = + /// No overlap, spread ⊕ field. + [] + let ``{...{A,B},C} = {A,B} ⊕ {C} = {A,B,C}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { ...R1; C : int } + + let _ : R2 = { A = 1; B = 2; C = 3 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// No overlap, spread from anonymous record ⊕ field. + [] + let ``{...{|A,B|},C} = {A,B} ⊕ {C} = {A,B,C}`` () = + let src = + """ + type R2 = { ...{| A : int; B : int |}; C : int } + + let _ : R2 = { A = 1; B = 2; C = 3 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// No overlap, field ⊕ spread. + [] + let ``{A,...{B,C}} = {A} ⊕ {B,C} = {A,B,C}`` () = + let src = + """ + type R1 = { B : int; C : int } + type R2 = { A : int; ...R1 } + + let _ : R2 = { A = 1; B = 2; C = 3 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// No overlap, spread ⊕ spread. + [] + let ``{...{A,B},...{C,D}} = {A,B} ⊕ {C,D} = {A,B,C,D}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { C : int; D : int } + type R3 = { ...R1; ...R2 } + + let _ : R3 = { A = 1; B = 2; C = 3; D = 4 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Rightward explicit duplicate field shadows field from spread. + [] + let ``{...{A₀,B},A₁} = {A₀,B} ⊕ {A₁} = {A₁,B,C}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { ...R1; A : string } + + let _ : R2 = { A = "1"; B = 2 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Rightward spread field shadows leftward spread field. + [] + let ``{...{A₀,B},...{A₁}} = {A₀,B} ⊕ {A₁} = {A₁,B,C}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { A : string } + type R3 = { ...R1; ...R2 } + type R4 = { ...R2; ...R1 } + + let _ : R3 = { A = "1"; B = 2 } + let _ : R4 = { A = 1; B = 2 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Rightward spread field shadows leftward explicit field with warning. + [] + let ``{A₀,...{A₁,B}} = {A₀} ⊕ {A₁,B} = {A₁_warn,B,C}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { A : string; ...R1 } + + let _ : R2 = { A = 1; B = 2 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3882, Line 3, Col 45, Line 3, Col 50, "Spread field 'A: int' from type 'R1' shadows an explicitly declared field with the same name.") + + /// Explicit duplicate fields remain disallowed. + [] + let ``{A₀,...{A₁,B},A₂} = {A₀} ⊕ {A₁,B} ⊕ {A₂} = {A₁_warn,B,A₂_error}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { A : string; ...R1; A : float } + + let _ : R2 = { A = 1; B = 2 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Warning 3882, Line 3, Col 45, Line 3, Col 50, "Spread field 'A: int' from type 'R1' shadows an explicitly declared field with the same name." + Error 37, Line 3, Col 52, Line 3, Col 53, "Duplicate definition of field 'A'" + ] + + [] + let ``No dupes allowed, multiple`` () = + let src = + """ + type R1 = { A : int; B : string } + type R2 = { A : decimal } + type R3 = { ...R2; A : string; ...R1; A : float } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Warning 3882, Line 4, Col 52, Line 4, Col 57, "Spread field 'A: int' from type 'R1' shadows an explicitly declared field with the same name." + Error 37, Line 4, Col 59, Line 4, Col 60, "Duplicate definition of field 'A'" + ] + + module Accessibility = + /// Fields should have the accessibility of the target type. + /// A spread from less to more accessible is valid as long as the less accessible + /// fields are accessible at the point of the spread. + [] + let ``Accessibility comes from target`` () = + let src = + """ + type private R1 = { A : int; B : string } + type public R2 = { ...R1 } + + let public r2 : R2 = { A = 1; B = "2" } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module Mutability = + [] + let ``Mutability is brought over`` () = + let src = + """ + type R1 = { A : int; mutable B : string } + type R2 = { ...R1 } + + let r2 : R2 = { A = 1; B = "3" } + r2.B <- "99" + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module GenericTypeParameters = + [] + let ``Single type parameter, inferred at usage`` () = + let src = + """ + type R1<'a> = { A : 'a; B : string } + type R2<'a> = { X : 'a; Y : string } + type R3<'a> = { ...R1<'a>; ...R2<'a> } + + let _ : R3<_> = { A = 3; B = "lol"; X = 4; Y = "haha" } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``Single type parameter, annotated at usage`` () = + let src = + """ + type R1<'a> = { A : 'a; B : string } + type R2<'a> = { X : 'a; Y : string } + type R3<'a> = { ...R1<'a>; ...R2<'a> } + + let _ : R3 = { A = 3; B = "lol"; X = 4; Y = "haha" } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``Multiple type parameters`` () = + let src = + """ + type R1<'a> = { A : 'a; B : string } + type R2<'a> = { X : 'a; Y : string } + type R3<'a, 'b> = { ...R1<'a>; ...R2<'b> } + + let _ : R3<_, _> = { A = 3; B = "lol"; X = 3.14; Y = "haha" } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``'a → 'a list`` () = + let src = + """ + type R1<'a> = { A : 'a } + type R2<'a> = { ...R1<'a list> } + + let _ : R2 = { A = [3] } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``Single type parameter, not in scope, not allowed`` () = + let src = + """ + type R1<'a> = { A : 'a; B : string } + type R2<'a> = { X : 'a; Y : string } + type R3<'a> = { ...R1<'a>; ...R2<'b> } + type R4 = { ...R1<'a>; ...R2<'b> } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 39, Line 4, Col 54, Line 4, Col 56, "The type parameter 'b is not defined." + Error 39, Line 5, Col 39, Line 5, Col 41, "The type parameter 'a is not defined." + Error 39, Line 5, Col 50, Line 5, Col 52, "The type parameter 'b is not defined." + ] + + /// Akin to: + /// + /// type R1<[] 'a> = { A : int<'a> } + /// type R2<'a> = { X : R1<'a> } + [] + let ``Measure attribute on source, required on spread destination`` () = + let src = + """ + type R1<[] 'a> = { A : int<'a> } + type R2<'a> = { ...R1<'a> } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 702, Line 3, Col 43, Line 3, Col 45, "Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute.") + + [] + let ``Measure attribute on source, measure on spread destination, OK`` () = + let src = + """ + type R1<[] 'a> = { A : int<'a> } + type R2<[] 'b> = { ...R1<'b> } + + type [] m + type R3 = { ...R1 } + + let _ : R1 = { A = 3 } + let _ : R2 = { A = 3 } + let _ : R3 = { A = 3 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Akin to: + /// + /// type R1<'a when 'a : comparison> = { A : 'a } + /// type R2<'a> = { X : R1<'a> } + [] + let ``Constraint on source, required on spread destination`` () = + let src = + """ + type R1<'a when 'a : comparison> = { A : 'a } + type R2<'a> = { ...R1<'a> } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 3, Col 40, Line 3, Col 46, "A type parameter is missing a constraint 'when 'a: comparison'") + + [] + let ``Constraint on source, required on spread destination, error if not compatible at usage`` () = + let src = + """ + type R1<'a when 'a : comparison> = { A : 'a list } + type R2<'a when 'a : comparison > = { ...R1<'a> } + + let _ : R2<_> = { A = [obj ()] } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 193, Line 5, Col 44, Line 5, Col 50, "The type 'obj' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface") + + [] + let ``Constraint on source, constraint on spread destination, compatible at usage, OK`` () = + let src = + """ + type R1<'a when 'a : comparison> = { A : 'a } + type R2<'a when 'a : comparison> = { ...R1<'a> } + type R3<'a when 'a : comparison> = { ...R1<'a list> } + + let _ : R1 = { A = 3 } + let _ : R2 = { A = 3 } + let _ : R3 = { A = [3] } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module NonRecordSource = + [] + let ``{...class} → error`` () = + let src = + """ + type C () = + member _.A = 1 + member _.B = 2 + + type R = { ...C } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3879, Line 6, Col 32, Line 6, Col 36, "The source type of a spread into a record type definition must itself be a nominal or anonymous record type.") + + [] + let ``{...abstract_class} → error`` () = + let src = + """ + [] + type C () = + abstract A : int + default _.A = 1 + abstract B : int + default _.B = 2 + + type R = { ...C } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3879, Line 9, Col 32, Line 9, Col 36, "The source type of a spread into a record type definition must itself be a nominal or anonymous record type.") + + [] + let ``{...struct} → error`` () = + let src = + """ + [] + type S = + member _.A = 1 + member _.B = 2 + + type R = { ...S } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3879, Line 7, Col 32, Line 7, Col 36, "The source type of a spread into a record type definition must itself be a nominal or anonymous record type.") + + [] + let ``{...interface} → error`` () = + let src = + """ + type IFace = + abstract A : int + abstract B : int + + type R = { ...IFace } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3879, Line 6, Col 32, Line 6, Col 40, "The source type of a spread into a record type definition must itself be a nominal or anonymous record type.") + + [] + let ``{...int} → error`` () = + let src = + """ + type R = { ...int } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3879, Line 2, Col 32, Line 2, Col 38, "The source type of a spread into a record type definition must itself be a nominal or anonymous record type.") + + [] + let ``{...(int -> int)} → error`` () = + let src = + """ + type R = { ...(int -> int) } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3879, Line 2, Col 32, Line 2, Col 47, "The source type of a spread into a record type definition must itself be a nominal or anonymous record type.") + + module Recursion = + [] + let ``Mutually recursive type spreads → error`` () = + let src = + """ + type R = { A : int; ...S; B : int } + and S = { C : int; ...R; D : int } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3886, Line 2, Col 26, Line 2, Col 27, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 3, Col 26, Line 3, Col 27, "This type definition involves a cyclic reference through a spread." + ] + + [] + let ``Mutually recursive type spreads with some indirection → error`` () = + let src = + """ + type R = { A : int; ...S } + and S = { B : int; ...T } + and T = { C : int; ...U } + and U = { D : int; ...R } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3886, Line 2, Col 26, Line 2, Col 27, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 3, Col 26, Line 3, Col 27, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 4, Col 26, Line 4, Col 27, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 5, Col 26, Line 5, Col 27, "This type definition involves a cyclic reference through a spread." + ] + + [] + let ``Mutually recursive type spreads in recursive module → error`` () = + let src = + """ + module rec M + + type R = { A : int; ...S; B : int } + type S = { C : int; ...R; D : int } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3886, Line 4, Col 26, Line 4, Col 27, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 5, Col 26, Line 5, Col 27, "This type definition involves a cyclic reference through a spread." + ] + + [] + let ``Complex mutually recursive type spreads → error`` () = + let src = + """ + module rec M + + [] + module N = + type R = { A : int; ...O.S } + + module O = + type S = { B : int; ...T } + + type T = { C : int; ...U } + + [] + module P = + [] + module Q = + type U = { D : int; ...R } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3886, Line 6, Col 30, Line 6, Col 31, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 9, Col 34, Line 9, Col 35, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 11, Col 26, Line 11, Col 27, "This type definition involves a cyclic reference through a spread." + Error 3886, Line 17, Col 34, Line 17, Col 35, "This type definition involves a cyclic reference through a spread." + ] + + [] + let ``Mutually recursive type defns with spreads, no cycles → success`` () = + let src = + """ + module M = + type R = { α : int } + and S = { β : int } + and T = { γ : int } + and U = { δ : int } + + type R = { A : int; ...M.S } + and S = { B : int; ...M.T } + and T = { C : int; ...M.U } + and U = { D : int; ...M.R } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module AnonymousRecordExpressionSpreads = + module Algebra = + /// No overlap, spread ⊕ field. + [] + let ``{...{A,B},C} = {A,B} ⊕ {C} = {A,B,C}`` () = + let src = + """ + let r1 = {| A = 1; B = 2 |} + + let r2 : {| A : int ; B : int; C : int |} = {| ...r1; C = 3 |} + let r2' : {| A : int ; B : int; C : int |} = {| {||} with ...r1; C = 3 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// No overlap, field ⊕ spread. + [] + let ``{A,...{B,C}} = {A} ⊕ {B,C} = {A,B,C}`` () = + let src = + """ + let r1 = {| A = 1; B = 2 |} + + let r2 : {| A : int ; B : int; C : int |} = {| C = 3; ...r1 |} + let r2' : {| A : int ; B : int; C : int |} = {| {||} with C = 3; ...r1 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// No overlap, spread ⊕ spread. + [] + let ``{...{A,B},...{C,D}} = {A,B} ⊕ {C,D} = {A,B,C,D}`` () = + let src = + """ + let r1 = {| A = 1 ; B = 2 |} + let r2 = {| C = 3; D = 4 |} + + let r3 : {| A : int ; B : int; C : int; D : int |} = {| ...r1; ...r2 |} + let r4 : {| A : int ; B : int; C : int; D : int |} = {| ...r2; ...r3 |} + let r3' : {| A : int ; B : int; C : int; D : int |} = {| {||} with ...r1; ...r2 |} + let r4' : {| A : int ; B : int; C : int; D : int |} = {| {||} with ...r2; ...r3 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Rightward explicit duplicate field shadows field from spread. + [] + let ``{...{A₀,B},A₁} = {A₀,B} ⊕ {A₁} = {A₁,B,C}`` () = + let src = + """ + let r1 = {| A = 1; B = 2 |} + + let r2 : {| A : string; B : int |} = {| ...r1; A = "A" |} + let r2' : {| A : string; B : int |} = {| {||} with ...r1; A = "A" |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Rightward spread field shadows leftward spread field. + [] + let ``{...{A₀,B},...{A₁}} = {A₀,B} ⊕ {A₁} = {A₁,B,C}`` () = + let src = + """ + let r1 = {| A = 1; B = 2 |} + let r2 = {| A = "A" |} + + let r3 : {| A : string; B : int |} = {| ...r1; ...r2 |} + let r4 : {| A : int; B : int |} = {| ...r2; ...r1 |} + + let r3' : {| A : string; B : int |} = {| {||} with ...r1; ...r2 |} + let r4' : {| A : int; B : int |} = {| {||} with ...r2; ...r1 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Rightward spread field shadows leftward explicit field with warning. + [] + let ``{A₀,...{A₁,B}} = {A₀} ⊕ {A₁,B} = {A₁_warn,B,C}`` () = + let src = + """ + let r1 = {| A = 1; B = 2 |} + + let r2 : {| A : int; B : int |} = {| A = "A"; ...r1 |} + let r2' : {| A : int; B : int |} = {| {||} with A = "A"; ...r1 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Warning 3883, Line 4, Col 67, Line 4, Col 72, "Spread field 'A: int' shadows an explicitly declared field with the same name." + Warning 3883, Line 5, Col 78, Line 5, Col 83, "Spread field 'A: int' shadows an explicitly declared field with the same name." + ] + + /// Explicit duplicate fields remain disallowed. + [] + let ``{A₀,...{A₁,B},A₂} = {A₀} ⊕ {A₁,B} ⊕ {A₂} = {A₁_warn,B,A₂_error}`` () = + let src = + """ + let r1 = {| A = 1; B = 2 |} + + let r2 = {| A = "A"; ...r1; A = 3.14 |} + let r2' = {| {||} with A = "A"; ...r1; A = 3.14 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Warning 3883, Line 4, Col 42, Line 4, Col 47, "Spread field 'A: int' shadows an explicitly declared field with the same name." + Error 3522, Line 4, Col 49, Line 4, Col 57, "The field 'A' appears multiple times in this record expression." + Error 3522, Line 5, Col 31, Line 5, Col 71, "The field 'A' appears multiple times in this record expression." + ] + + [] + let ``No dupes allowed, multiple`` () = + let src = + """ + let r1 = {| A = 1; B = "B" |} + let r2 = {| A = 3m |} + + let r3 = {| ...r2; A = "A"; ...r1; A = 3.14 |} + let r3' = {| {||} with ...r2; A = "A"; ...r1; A = 3.14 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Warning 3883, Line 5, Col 49, Line 5, Col 54, "Spread field 'A: int' shadows an explicitly declared field with the same name." + Error 3522, Line 5, Col 56, Line 5, Col 64, "The field 'A' appears multiple times in this record expression." + Error 3522, Line 6, Col 31, Line 6, Col 78, "The field 'A' appears multiple times in this record expression." + ] + + [] + let ``{...{A,B,C}}:{B} = {A,B,C} ∩ {B} = {B}`` () = + let src = + """ + let src = {| A = 1; B = "B"; C = 3m |} + + let typedTarget : {| B : string |} = {| ...src |} + let typedTarget' : {| B : string |} = {| {||} with ...src |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``{...{}} = ∅ ⊕ ∅ = ∅`` () = + let src = + """ + module M + + let r = {| ...{||} |} + let r' = {| {||} with ...{||} |} + + if r <> {||} then failwith $"Expected {{||}} but got %A{r}." + if r' <> {||} then failwith $"Expected {{||}} but got %A{r'}." + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> asExe + |> compileAndRun + |> shouldSucceed + + module Accessibility = + /// Fields should have the accessibility of the target type. + /// A spread from less to more accessible is valid as long as the less accessible + /// fields are accessible at the point of the spread. + [] + let ``Accessibility comes from target`` () = + let src = + """ + let private r1 = {| A = 1; B = "B" |} + + let public r2 : {| A : int; B : string |} = {| ...r1 |} + let public r2' : {| A : int; B : string |} = {| {||} with ...r1 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module Mutability = + [] + let ``Mutability is _not_ brought over`` () = + let src = + """ + type R1 = { A : int; mutable B : string } + let r1 = { A = 1; B = "B" } + + let r2 = {| ...r1 |} + r2.B <- "99" + + let r2' = {| {||} with ...r1 |} + r2'.B <- "99" + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 799, Line 6, Col 21, Line 6, Col 25, "Invalid assignment" + Error 799, Line 9, Col 21, Line 9, Col 26, "Invalid assignment" + ] + + module GenericTypeParameters = + [] + let ``Single type parameter`` () = + let src = + """ + let f (x : 'a) = + let r1 : {| A : 'a; B : string |} = {| A = x; B = "B" |} + let r2 : {| X : 'a; Y : string |} = {| X = x; Y = "Y" |} + + let r3 : {| A : 'a; B : string; X : 'a; Y : string |} = {| ...r1; ...r2 |} + let r3' : {| A : 'a; B : string; X : 'a; Y : string |} = {| {||} with ...r1; ...r2 |} + r3, r3' + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``Multiple type parameters`` () = + let src = + """ + let r1 (x : 'a) = {| A = x; B = "B" |} + let r2 (x : 'a) = {| X = x; Y = "Y" |} + + let r3 (x : 'a) (y : 'b) : {| A : 'a; B : string; X : 'b; Y : string |} = {| ...r1 x; ...r2 y |} + let r3' (x : 'a) (y : 'b) : {| A : 'a; B : string; X : 'b; Y : string |} = {| {||} with ...r1 x; ...r2 y |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``Measure attribute on source, present on spread destination`` () = + let src = + """ + let r1 (r2 : {| A : int<'m> |}) : {| A : int<'m> |} = {| ...r2 |} + let r1' (r2 : {| A : int<'m> |}) : {| A : int<'m> |} = {| {||} with ...r2 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``Constraints kept`` () = + let src = + """ + let r1<'a when 'a : comparison> (r2 : {| A : 'a |}) : unit -> {| A : 'a |} = fun () -> {| ...r2 |} + let r1'<'a when 'a : comparison> (r2 : {| A : 'a |}) : unit -> {| A : 'a |} = fun () -> {| {||} with ...r2 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module NonRecordSource = + [] + let ``{...class} → error`` () = + let src = + """ + type C () = + member _.A = 1 + member _.B = 2 + + let r = {| ...C () |} + let r' = {| {||} with ...C () |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3881, Line 6, Col 35, Line 6, Col 39, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + Error 3881, Line 7, Col 43, Line 7, Col 50, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + ] + + [] + let ``{...abstract_class} → error`` () = + let src = + """ + [] + type C () = + abstract A : int + abstract B : int + + let r = + {| + ... + { new C () with + member _.A = 1 + member _.B = 2 } + |} + + let r' = + {| + {||} with + ... + { new C () with + member _.A = 1 + member _.B = 2 } + |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3881, Line 10, Col 33, Line 12, Col 53, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + Error 3881, Line 18, Col 33, Line 21, Col 57, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + ] + + [] + let ``{...struct} → error`` () = + let src = + """ + [] + type S = + member _.A = 1 + member _.B = 2 + + let r = {| ...S () |} + let r' = {| {||} with ...S () |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3881, Line 7, Col 35, Line 7, Col 39, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + Error 3881, Line 8, Col 43, Line 8, Col 50, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + ] + + [] + let ``{...interface} → error`` () = + let src = + """ + type IFace = + abstract A : int + abstract B : int + + let r = + {| + ... + { new IFace with + member _.A = 1 + member _.B = 2 } + |} + + let r' = + {| + {||} with + ... + { new IFace with + member _.A = 1 + member _.B = 2 } + |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3881, Line 9, Col 33, Line 11, Col 53, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + Error 3881, Line 17, Col 33, Line 20, Col 57, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + ] + + [] + let ``{...int} → error`` () = + let src = + """ + let r = {| ...0 |} + let r' = {| {||} with ...0 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3881, Line 2, Col 35, Line 2, Col 36, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + Error 3881, Line 3, Col 43, Line 3, Col 47, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + ] + + [] + let ``{...(int -> int)} → error`` () = + let src = + """ + let r = {| ...(fun x -> x + 1) |} + let r' = {| {||} with ...(fun x -> x + 1) |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3881, Line 2, Col 35, Line 2, Col 51, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + Error 3881, Line 3, Col 43, Line 3, Col 62, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + ] + + [] + let ``{...int list} → error`` () = + let src = + """ + let r = {| ...[1..10] |} + let r' = {| {||} with ...[1..10] |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3881, Line 2, Col 35, Line 2, Col 42, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + Error 3881, Line 3, Col 43, Line 3, Col 53, "The source expression of a spread into an anonymous record expression must have a nominal or anonymous record type." + ] + + module MembersOtherThanRecordFields = + [] + let ``Instance properties that are not record fields are ignored`` () = + let src = + """ + type R1 = + { A : int + B : string } + member this.Lol = string this.A + this.B + + type R2 = { ...R1; C : string } + + let r1 = { A = 3; B = "3"; C = "asdf" } + let r2 : {| A : int; B : string; C : string |} = {| ...r1 |} + let r2' : {| A : int; B : string; C : string |} = {| {||} with ...r1 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``All members other than record fields are ignored`` () = + let src = + """ + type R1 = + { A : int + B : int } + member this.Lol = this.A + this.B + member _.Ha () = () + static member X = "3" + static member val Y = 42 + static member Q () = () + + type R2 = { ...R1; C : string } + + let r2 : R2 = { A = 3; B = 3; C = "asdf" } + let r3 : {| A : int; B : int; C : string |} = {| ...r2 |} + let r3' : {| A : int; B : int; C : string |} = {| {||} with ...r2 |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module Effects = + [] + let ``Effects in spread sources are evaluated exactly once per spread, even if all fields are shadowed`` () = + let src = + """ + let effects = ResizeArray () + let f () = effects.Add "f"; {| A = 0; B = 1 |} + let g () = effects.Add "g"; {| A = 2; B = 3 |} + let h () = effects.Add "h"; {| A = 99 |} + let r = {| ...g (); ...g (); ...h (); A = 100 |} + let r' = {| f () with ...g (); ...g (); ...h (); A = 100 |} + + if r.A <> 100 then failwith $"Expected r.A = 100 but got %d{r.A}." + if r'.A <> 100 then failwith $"Expected r'.A = 100 but got %d{r'.A}." + match List.ofSeq effects with + | ["g"; "g"; "h"; "f"; "g"; "g"; "h"] -> () + | unexpected -> failwith $"Expected [\"g\"; \"g\"; \"h\"; \"f\"; \"g\"; \"g\"; \"h\"] but got %A{unexpected}." + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> compileExeAndRun + |> shouldSucceed + + module BackCompat = + [] + let ``Inference works the same`` () = + let src = + """ + module M + + let f x y = + if x = y then () + else failwith $"Expected %A{x} = %A{y}." + + do f {| a = 1 - 1 |} {| a = Unchecked.defaultof<_> |} + + #nowarn FS3883 // Spread shadowing explicit. + + let r = {| a = Unchecked.defaultof<_> |} + do f {| a = 1 - 1 |} {| a = "a"; ...r |} + + let _ = + let r = {| a = Unchecked.defaultof<_> |} + f {| a = 1 - 1 |} {| a = "a"; ...r |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> compileExeAndRun + |> shouldSucceed + + [] + let ``Name resolution order is the same`` () = + let src = + """ + module M + + type RecordTypeB = + { Name: string + FieldB: int } + + // When the anonymous record expression is encountered, it must commit to "RecordTypeB". + // The return type of "f" is, at that point, a variable type + // and must be correctly inferred by the point where we process the subsequence + // dot-notation "f().Name" + let rec f() = + {| Name = "" + FieldA = f().Name + |} + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> compile + |> shouldSucceed + + module Conversions = + () + + module NominalRecordExpressionSpreads = + module Algebra = + /// No overlap, spread ⊕ field. + [] + let ``{...{A,B},C} = {A,B} ⊕ {C} = {A,B,C}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { A : int; B : int; C : int } + + let r1 = { A = 1; B = 2 } + let r2 = { ...r1; C = 3 } + + let r1' = {| A = 1; B = 2 |} + let r2' = { ...r1; C = 3 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// No overlap, field ⊕ spread. + [] + let ``{A,...{B,C}} = {A} ⊕ {B,C} = {A,B,C}`` () = + let src = + """ + type R1 = { B : int; C : int } + type R2 = { A : int; B : int; C : int } + + let r1 = { B = 1; C = 2 } + let r2 = { A = 3; ...r1 } + + let r1' = {| B = 1; C = 2 |} + let r2' = { A = 3; ...r1 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// No overlap, spread ⊕ spread. + [] + let ``{...{A,B},...{C,D}} = {A,B} ⊕ {C,D} = {A,B,C,D}`` () = + let src = + """ + type R1 = { A : int; B : int } + type R2 = { C : int; D : int } + type R3 = { A : int; B : int; C : int; D : int } + + let r1 = { A = 1; B = 2 } + let r2 = { C = 3; D = 4 } + let r3 = { ...r1; ...r2 } + let r3' = { ...r2; ...r3 } + + let r1' = {| A = 1; B = 2 |} + let r2' = {| C = 3; D = 4 |} + let r3'' = { ...r1; ...r2 } + let r3''' = { ...r2; ...r3 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + /// Rightward explicit duplicate field shadows field from spread. + [] + let ``{...{A₀,B},A₁} = {A₀,B} ⊕ {A₁} = {A₁,B,C}`` () = + let src = + """ + module M + + type R1 = { A : int; B : int } + + let r1 = { A = 1; B = 2 } + let r1' = { ...r1; A = 99 } + + if r1'.A <> 99 then failwith $"Expected r1'.A = 99 but got %A{r1'.A}." + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> asExe + |> compileAndRun + |> shouldSucceed + + /// Rightward spread field shadows leftward spread field. + [] + let ``{...{A₀,B},...{A₁}} = {A₀,B} ⊕ {A₁} = {A₁,B,C}`` () = + let src = + """ + module M + + type R1 = { A : int; B : int } + + let r1 = { A = 1; B = 2 } + let r1' = { ...r1; ...{| A = 99 |} } + + if r1'.A <> 99 then failwith $"Expected r1'.A = 99 but got %A{r1'.A}." + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> asExe + |> compileAndRun + |> shouldSucceed + + /// Rightward spread field shadows leftward explicit field with warning. + [] + let ``{A₀,...{A₁,B}} = {A₀} ⊕ {A₁,B} = {A₁_warn,B,C}`` () = + let src = + """ + type R1 = { A : int; B : int } + + let r1 = { A = 1; B = 2 } + let r1' = { A = 0; ...r1 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3883, Line 5, Col 40, Line 5, Col 45, "Spread field 'A: int' shadows an explicitly declared field with the same name.") + + /// Explicit duplicate fields remain disallowed. + [] + let ``{A₀,...{A₁,B},A₂} = {A₀} ⊕ {A₁,B} ⊕ {A₂} = {A₁_warn,B,A₂_error}`` () = + let src = + """ + type R1 = { A : int; B : int } + + let r1 = { A = 1; B = 2; A = 3; ...{| A = 4 |}; A = 5 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 668, Line 4, Col 46, Line 4, Col 51, "The field 'A' appears multiple times in this record expression or pattern" + Warning 3883, Line 4, Col 53, Line 4, Col 67, "Spread field 'A: int' shadows an explicitly declared field with the same name." + Error 668, Line 4, Col 69, Line 4, Col 74, "The field 'A' appears multiple times in this record expression or pattern" + ] + + /// Extra fields are ignored. + [] + let ``{...{A,B,C}}:{B} = {A,B,C} ∩ {B} = {B}`` () = + let src = + """ + type R1 = { A : int; B : int; C : int } + type R2 = { B : int } + + let r1 = { A = 1; B = 2; C = 3 } + let r2 : R2 = { ...r1 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module Accessibility = + /// Fields should have the accessibility of the target type. + /// A spread from less to more accessible is valid as long as the less accessible + /// fields are accessible at the point of the spread. + [] + let ``Accessibility comes from target`` () = + let src = + """ + type private R1 = { A : int; B : string } + type public R2 = { ...R1 } + + let private r1 = { A = 1; B = "2" } + let public r2 : R2 = { ...r1 } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + module NonRecordSource = + [] + let ``{...class} → error`` () = + let src = + """ + type C () = + member _.A = 1 + member _.B = 2 + + type R = { A : int } + + let r : R = { ...C () } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3880, Line 8, Col 35, Line 8, Col 42, "The source expression of a spread into a nominal record expression must have a nominal or anonymous record type." + Error 764, Line 8, Col 33, Line 8, Col 44, "No assignment given for field 'A' of type 'Test.R'" + ] + + [] + let ``{...abstract_class} → error`` () = + let src = + """ + [] + type C () = + abstract A : int + abstract B : int + + type R = { A : int } + + let r : R = + { + ... + { new C () with + member _.A = 1 + member _.B = 2 } + } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3880, Line 11, Col 29, Line 14, Col 53, "The source expression of a spread into a nominal record expression must have a nominal or anonymous record type." + Error 764, Line 10, Col 25, Line 15, Col 26, "No assignment given for field 'A' of type 'Test.R'" + ] + + [] + let ``{...struct} → error`` () = + let src = + """ + [] + type S = + member _.A = 1 + member _.B = 2 + + type R = { A : int } + + let r : R = { ...S () } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3880, Line 9, Col 35, Line 9, Col 42, "The source expression of a spread into a nominal record expression must have a nominal or anonymous record type." + Error 764, Line 9, Col 33, Line 9, Col 44, "No assignment given for field 'A' of type 'Test.R'" + ] + + [] + let ``{...interface} → error`` () = + let src = + """ + type IFace = + abstract A : int + abstract B : int + + type R = { A : int } + + let r : R = + { + ... + { new IFace with + member _.A = 1 + member _.B = 2 } + } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3880, Line 10, Col 29, Line 13, Col 53, "The source expression of a spread into a nominal record expression must have a nominal or anonymous record type." + Error 764, Line 9, Col 25, Line 14, Col 26, "No assignment given for field 'A' of type 'Test.R'" + ] + + [] + let ``{...int} → error`` () = + let src = + """ + type R = { A : int } + + let r : R = { ...int } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 3880, Line 4, Col 35, Line 4, Col 41, "The source expression of a spread into a nominal record expression must have a nominal or anonymous record type." + Error 764, Line 4, Col 33, Line 4, Col 43, "No assignment given for field 'A' of type 'Test.R'" + ] + + [] + let ``{...(int -> int)} → error`` () = + let src = + """ + type R = { A : int } + + let r = { ...(fun x -> x + 1) } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3880, Line 4, Col 31, Line 4, Col 50, "The source expression of a spread into a nominal record expression must have a nominal or anonymous record type.") + + module MembersOtherThanRecordFields = + [] + let ``Instance properties that are not record fields are ignored`` () = + let src = + """ + type R1 = + { A : int + B : string } + member this.Lol = string this.A + this.B + + type R2 = { ...R1; C : string } + + let _ : R2 = { A = 3; B = "3"; C = "asdf" } + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldSucceed + + [] + let ``All members other than record fields are ignored`` () = + let src = + """ + type R1 = + { A : int + B : int } + member this.Lol = this.A + this.B + member _.Ha () = () + static member X = "3" + static member val Y = 42 + static member Q () = () + + type R2 = { ...R1; C : string } + + let r2 : R2 = { A = 3; B = 3; C = "asdf" } + ignore r2.Lol // Should not exist. + r2.Ha () // Should not exist. + ignore R2.Y // Should not exist. + R2.Q () // Should not exist. + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> typecheck + |> shouldFail + |> withDiagnostics [ + Error 39, Line 14, Col 31, Line 14, Col 34, "The type 'R2' does not define the field, constructor or member 'Lol'." + Error 39, Line 15, Col 24, Line 15, Col 26, "The type 'R2' does not define the field, constructor or member 'Ha'." + Error 39, Line 16, Col 31, Line 16, Col 32, "The type 'R2' does not define the field, constructor or member 'Y'." + Error 39, Line 17, Col 24, Line 17, Col 25, "The type 'R2' does not define the field, constructor or member 'Q'." + ] + + module Effects = + [] + let ``Effects in spread sources are evaluated exactly once per spread, even if all fields are shadowed`` () = + let src = + """ + type R = { A : int; B : int } + + let effects = ResizeArray () + let f () = effects.Add "f"; { A = 0; B = 1 } + let g () = effects.Add "g"; { A = 2; B = 3 } + let h () = effects.Add "h"; {| A = 99 |} + let r = { ...g (); ...g (); ...h (); A = 100 } + let r' = { f () with ...g (); ...g (); ...h (); A = 100 } + + if r.A <> 100 then failwith $"Expected r.A = 100 but got %d{r.A}." + if r'.A <> 100 then failwith $"Expected r'.A = 100 but got %d{r'.A}." + match List.ofSeq effects with + | ["g"; "g"; "h"; "f"; "g"; "g"; "h"] -> () + | unexpected -> failwith $"Expected [\"g\"; \"g\"; \"h\"; \"f\"; \"g\"; \"g\"; \"h\"] but got %A{unexpected}." + """ + + FSharp src + |> withLangVersion SupportedLangVersion + |> compileExeAndRun + |> shouldSucceed 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 e2aaca46ac3..7501c7d2010 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 @@ -6530,6 +6530,28 @@ FSharp.Compiler.Syntax.QualifiedNameOfFile: Int32 get_Tag() FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String Text FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String ToString() FSharp.Compiler.Syntax.QualifiedNameOfFile: System.String get_Text() +FSharp.Compiler.Syntax.RecordBinding+Field: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr] declExpr +FSharp.Compiler.Syntax.RecordBinding+Field: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr] get_declExpr() +FSharp.Compiler.Syntax.RecordBinding+Field: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] equalsRange +FSharp.Compiler.Syntax.RecordBinding+Field: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() +FSharp.Compiler.Syntax.RecordBinding+Field: System.Tuple`2[FSharp.Compiler.Syntax.SynLongIdent,System.Boolean] get_name() +FSharp.Compiler.Syntax.RecordBinding+Field: System.Tuple`2[FSharp.Compiler.Syntax.SynLongIdent,System.Boolean] name +FSharp.Compiler.Syntax.RecordBinding+Spread: FSharp.Compiler.Syntax.SynExprSpread get_spread() +FSharp.Compiler.Syntax.RecordBinding+Spread: FSharp.Compiler.Syntax.SynExprSpread spread +FSharp.Compiler.Syntax.RecordBinding+Tags: Int32 Field +FSharp.Compiler.Syntax.RecordBinding+Tags: Int32 Spread +FSharp.Compiler.Syntax.RecordBinding: Boolean IsField +FSharp.Compiler.Syntax.RecordBinding: Boolean IsSpread +FSharp.Compiler.Syntax.RecordBinding: Boolean get_IsField() +FSharp.Compiler.Syntax.RecordBinding: Boolean get_IsSpread() +FSharp.Compiler.Syntax.RecordBinding: FSharp.Compiler.Syntax.RecordBinding NewField(System.Tuple`2[FSharp.Compiler.Syntax.SynLongIdent,System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr]) +FSharp.Compiler.Syntax.RecordBinding: FSharp.Compiler.Syntax.RecordBinding NewSpread(FSharp.Compiler.Syntax.SynExprSpread) +FSharp.Compiler.Syntax.RecordBinding: FSharp.Compiler.Syntax.RecordBinding+Field +FSharp.Compiler.Syntax.RecordBinding: FSharp.Compiler.Syntax.RecordBinding+Spread +FSharp.Compiler.Syntax.RecordBinding: FSharp.Compiler.Syntax.RecordBinding+Tags +FSharp.Compiler.Syntax.RecordBinding: Int32 Tag +FSharp.Compiler.Syntax.RecordBinding: Int32 get_Tag() +FSharp.Compiler.Syntax.RecordBinding: System.String ToString() FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(FSharp.Compiler.Syntax.SeqExprOnly) FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(FSharp.Compiler.Syntax.SeqExprOnly, System.Collections.IEqualityComparer) FSharp.Compiler.Syntax.SeqExprOnly: Boolean Equals(System.Object) @@ -7010,8 +7032,8 @@ FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.SyntaxTrivia.SynExprAno FSharp.Compiler.Syntax.SynExpr+AnonRecd: FSharp.Compiler.SyntaxTrivia.SynExprAnonRecdTrivia 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() -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.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread] get_recordFields() +FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread] recordFields FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]] copyInfo FSharp.Compiler.Syntax.SynExpr+AnonRecd: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]] get_copyInfo() FSharp.Compiler.Syntax.SynExpr+App: Boolean get_isInfix() @@ -7408,8 +7430,8 @@ 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.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.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread] get_recordFields() +FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread] recordFields FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]] copyInfo FSharp.Compiler.Syntax.SynExpr+Record: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]] 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[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]],FSharp.Compiler.Text.Range]] baseInfo @@ -7760,7 +7782,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,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]], 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,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread], 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) @@ -7811,7 +7833,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[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]],FSharp.Compiler.Text.Range]], Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]], 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[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]],FSharp.Compiler.Text.Range]], Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.SynExpr,System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread], 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) @@ -7907,6 +7929,42 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Text.Range get_RangeWithoutAnyEx FSharp.Compiler.Syntax.SynExpr: Int32 Tag FSharp.Compiler.Syntax.SynExpr: Int32 get_Tag() FSharp.Compiler.Syntax.SynExpr: System.String ToString() +FSharp.Compiler.Syntax.SynExprAnonRecordField: FSharp.Compiler.Syntax.SynExpr expr +FSharp.Compiler.Syntax.SynExprAnonRecordField: FSharp.Compiler.Syntax.SynExpr get_expr() +FSharp.Compiler.Syntax.SynExprAnonRecordField: FSharp.Compiler.Syntax.SynExprAnonRecordField NewSynExprAnonRecordField(FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExprAnonRecordField: FSharp.Compiler.Syntax.SynLongIdent fieldName +FSharp.Compiler.Syntax.SynExprAnonRecordField: FSharp.Compiler.Syntax.SynLongIdent get_fieldName() +FSharp.Compiler.Syntax.SynExprAnonRecordField: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynExprAnonRecordField: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynExprAnonRecordField: Int32 Tag +FSharp.Compiler.Syntax.SynExprAnonRecordField: Int32 get_Tag() +FSharp.Compiler.Syntax.SynExprAnonRecordField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] equalsRange +FSharp.Compiler.Syntax.SynExprAnonRecordField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_equalsRange() +FSharp.Compiler.Syntax.SynExprAnonRecordField: System.String ToString() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Field: FSharp.Compiler.Syntax.SynExprAnonRecordField field +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Field: FSharp.Compiler.Syntax.SynExprAnonRecordField get_field() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Field: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Field: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Spread: FSharp.Compiler.Syntax.SynExprSpread get_spread() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Spread: FSharp.Compiler.Syntax.SynExprSpread spread +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Spread: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Spread: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Tags: Int32 Field +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Tags: Int32 Spread +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: Boolean IsField +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: Boolean IsSpread +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: Boolean get_IsField() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: Boolean get_IsSpread() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread NewField(FSharp.Compiler.Syntax.SynExprAnonRecordField, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread NewSpread(FSharp.Compiler.Syntax.SynExprSpread, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Field +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Spread +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread+Tags +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: FSharp.Compiler.Text.Range Range +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: FSharp.Compiler.Text.Range get_Range() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: Int32 Tag +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: Int32 get_Tag() +FSharp.Compiler.Syntax.SynExprAnonRecordFieldOrSpread: System.String ToString() FSharp.Compiler.Syntax.SynExprModule: Boolean shouldBeParenthesizedInContext(Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.String], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], FSharp.Compiler.Syntax.SynExpr) FSharp.Compiler.Syntax.SynExprRecordField: FSharp.Compiler.Syntax.SynExprRecordField NewSynExprRecordField(System.Tuple`2[FSharp.Compiler.Syntax.SynLongIdent,System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr], FSharp.Compiler.Text.Range, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) FSharp.Compiler.Syntax.SynExprRecordField: FSharp.Compiler.Text.Range get_range() @@ -7922,6 +7980,36 @@ FSharp.Compiler.Syntax.SynExprRecordField: Microsoft.FSharp.Core.FSharpOption`1[ FSharp.Compiler.Syntax.SynExprRecordField: System.String ToString() FSharp.Compiler.Syntax.SynExprRecordField: System.Tuple`2[FSharp.Compiler.Syntax.SynLongIdent,System.Boolean] fieldName FSharp.Compiler.Syntax.SynExprRecordField: System.Tuple`2[FSharp.Compiler.Syntax.SynLongIdent,System.Boolean] get_fieldName() +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Field: FSharp.Compiler.Syntax.SynExprRecordField field +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Field: FSharp.Compiler.Syntax.SynExprRecordField get_field() +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Spread: FSharp.Compiler.Syntax.SynExprSpread get_spread() +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Spread: FSharp.Compiler.Syntax.SynExprSpread spread +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Spread: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] blockSeparator +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Spread: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]] get_blockSeparator() +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Tags: Int32 Field +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Tags: Int32 Spread +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: Boolean IsField +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: Boolean IsSpread +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: Boolean get_IsField() +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: Boolean get_IsSpread() +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread NewField(FSharp.Compiler.Syntax.SynExprRecordField) +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread NewSpread(FSharp.Compiler.Syntax.SynExprSpread, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Position]]]) +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Field +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Spread +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread+Tags +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: Int32 Tag +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: Int32 get_Tag() +FSharp.Compiler.Syntax.SynExprRecordFieldOrSpread: System.String ToString() +FSharp.Compiler.Syntax.SynExprSpread: FSharp.Compiler.Syntax.SynExpr expr +FSharp.Compiler.Syntax.SynExprSpread: FSharp.Compiler.Syntax.SynExpr get_expr() +FSharp.Compiler.Syntax.SynExprSpread: FSharp.Compiler.Syntax.SynExprSpread NewSynExprSpread(FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExprSpread: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynExprSpread: FSharp.Compiler.Text.Range get_spreadRange() +FSharp.Compiler.Syntax.SynExprSpread: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynExprSpread: FSharp.Compiler.Text.Range spreadRange +FSharp.Compiler.Syntax.SynExprSpread: Int32 Tag +FSharp.Compiler.Syntax.SynExprSpread: Int32 get_Tag() +FSharp.Compiler.Syntax.SynExprSpread: System.String ToString() FSharp.Compiler.Syntax.SynField: Boolean get_isMutable() FSharp.Compiler.Syntax.SynField: Boolean get_isStatic() FSharp.Compiler.Syntax.SynField: Boolean isMutable @@ -7946,6 +8034,24 @@ FSharp.Compiler.Syntax.SynField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Com FSharp.Compiler.Syntax.SynField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] accessibility FSharp.Compiler.Syntax.SynField: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_accessibility() FSharp.Compiler.Syntax.SynField: System.String ToString() +FSharp.Compiler.Syntax.SynFieldOrSpread+Field: FSharp.Compiler.Syntax.SynField field +FSharp.Compiler.Syntax.SynFieldOrSpread+Field: FSharp.Compiler.Syntax.SynField get_field() +FSharp.Compiler.Syntax.SynFieldOrSpread+Spread: FSharp.Compiler.Syntax.SynTypeSpread get_spread() +FSharp.Compiler.Syntax.SynFieldOrSpread+Spread: FSharp.Compiler.Syntax.SynTypeSpread spread +FSharp.Compiler.Syntax.SynFieldOrSpread+Tags: Int32 Field +FSharp.Compiler.Syntax.SynFieldOrSpread+Tags: Int32 Spread +FSharp.Compiler.Syntax.SynFieldOrSpread: Boolean IsField +FSharp.Compiler.Syntax.SynFieldOrSpread: Boolean IsSpread +FSharp.Compiler.Syntax.SynFieldOrSpread: Boolean get_IsField() +FSharp.Compiler.Syntax.SynFieldOrSpread: Boolean get_IsSpread() +FSharp.Compiler.Syntax.SynFieldOrSpread: FSharp.Compiler.Syntax.SynFieldOrSpread NewField(FSharp.Compiler.Syntax.SynField) +FSharp.Compiler.Syntax.SynFieldOrSpread: FSharp.Compiler.Syntax.SynFieldOrSpread NewSpread(FSharp.Compiler.Syntax.SynTypeSpread) +FSharp.Compiler.Syntax.SynFieldOrSpread: FSharp.Compiler.Syntax.SynFieldOrSpread+Field +FSharp.Compiler.Syntax.SynFieldOrSpread: FSharp.Compiler.Syntax.SynFieldOrSpread+Spread +FSharp.Compiler.Syntax.SynFieldOrSpread: FSharp.Compiler.Syntax.SynFieldOrSpread+Tags +FSharp.Compiler.Syntax.SynFieldOrSpread: Int32 Tag +FSharp.Compiler.Syntax.SynFieldOrSpread: Int32 get_Tag() +FSharp.Compiler.Syntax.SynFieldOrSpread: System.String ToString() FSharp.Compiler.Syntax.SynIdent: FSharp.Compiler.Syntax.Ident get_ident() FSharp.Compiler.Syntax.SynIdent: FSharp.Compiler.Syntax.Ident ident FSharp.Compiler.Syntax.SynIdent: FSharp.Compiler.Syntax.SynIdent NewSynIdent(FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.SyntaxTrivia.IdentTrivia]) @@ -8237,6 +8343,10 @@ FSharp.Compiler.Syntax.SynMemberDefn+Open: FSharp.Compiler.Syntax.SynOpenDeclTar FSharp.Compiler.Syntax.SynMemberDefn+Open: FSharp.Compiler.Syntax.SynOpenDeclTarget target FSharp.Compiler.Syntax.SynMemberDefn+Open: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynMemberDefn+Open: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynMemberDefn+Spread: FSharp.Compiler.Syntax.SynExprSpread get_spread() +FSharp.Compiler.Syntax.SynMemberDefn+Spread: FSharp.Compiler.Syntax.SynExprSpread spread +FSharp.Compiler.Syntax.SynMemberDefn+Spread: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynMemberDefn+Spread: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 AbstractSlot FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 AutoProperty FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 GetSetMember @@ -8248,6 +8358,7 @@ FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 LetBindings FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 Member FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 NestedType FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 Open +FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 Spread FSharp.Compiler.Syntax.SynMemberDefn+Tags: Int32 ValField FSharp.Compiler.Syntax.SynMemberDefn+ValField: FSharp.Compiler.Syntax.SynField fieldInfo FSharp.Compiler.Syntax.SynMemberDefn+ValField: FSharp.Compiler.Syntax.SynField get_fieldInfo() @@ -8264,6 +8375,7 @@ FSharp.Compiler.Syntax.SynMemberDefn: Boolean IsLetBindings FSharp.Compiler.Syntax.SynMemberDefn: Boolean IsMember FSharp.Compiler.Syntax.SynMemberDefn: Boolean IsNestedType FSharp.Compiler.Syntax.SynMemberDefn: Boolean IsOpen +FSharp.Compiler.Syntax.SynMemberDefn: Boolean IsSpread FSharp.Compiler.Syntax.SynMemberDefn: Boolean IsValField FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsAbstractSlot() FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsAutoProperty() @@ -8276,6 +8388,7 @@ FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsLetBindings() FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsMember() FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsNestedType() FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsOpen() +FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsSpread() FSharp.Compiler.Syntax.SynMemberDefn: Boolean get_IsValField() FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewAbstractSlot(FSharp.Compiler.Syntax.SynValSig, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynMemberDefnAbstractSlotTrivia) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewAutoProperty(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList], Boolean, FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynType], FSharp.Compiler.Syntax.SynMemberKind, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Syntax.SynMemberFlags, FSharp.Compiler.Xml.PreXmlDoc, FSharp.Compiler.Syntax.SynValSigAccess, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynMemberDefnAutoPropertyTrivia) @@ -8288,6 +8401,7 @@ FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewLe FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewMember(FSharp.Compiler.Syntax.SynBinding, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewNestedType(FSharp.Compiler.Syntax.SynTypeDefn, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewOpen(FSharp.Compiler.Syntax.SynOpenDeclTarget, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewSpread(FSharp.Compiler.Syntax.SynExprSpread, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn NewValField(FSharp.Compiler.Syntax.SynField, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+AbstractSlot FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+AutoProperty @@ -8300,6 +8414,7 @@ FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+LetBi FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+Member FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+NestedType FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+Open +FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+Spread FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+Tags FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Syntax.SynMemberDefn+ValField FSharp.Compiler.Syntax.SynMemberDefn: FSharp.Compiler.Text.Range Range @@ -9791,8 +9906,8 @@ FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+None: FSharp.Compiler.Text.Range ge FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+None: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynField] get_recordFields() -FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynField] recordFields +FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynFieldOrSpread] get_recordFieldsAndSpreads() +FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynFieldOrSpread] recordFieldsAndSpreads FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] accessibility FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Record: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess] get_accessibility() FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Tags: Int32 Enum @@ -9836,7 +9951,7 @@ FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefn FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr NewGeneral(FSharp.Compiler.Syntax.SynTypeDefnKind, Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Syntax.SynType,FSharp.Compiler.Text.Range,Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.Ident]]], Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[FSharp.Compiler.Syntax.SynValSig,FSharp.Compiler.Syntax.SynMemberFlags]], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynField], Boolean, Boolean, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynPat], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr NewLibraryOnlyILAssembly(System.Object, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr NewNone(FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr NewRecord(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynField], FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr NewRecord(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynFieldOrSpread], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr NewTypeAbbrev(FSharp.Compiler.Syntax.ParserDetail, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr NewUnion(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynUnionCase], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr+Enum @@ -9853,6 +9968,16 @@ FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: FSharp.Compiler.Text.Range get_Ran FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: Int32 Tag FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: Int32 get_Tag() FSharp.Compiler.Syntax.SynTypeDefnSimpleRepr: System.String ToString() +FSharp.Compiler.Syntax.SynTypeSpread: FSharp.Compiler.Syntax.SynType get_ty() +FSharp.Compiler.Syntax.SynTypeSpread: FSharp.Compiler.Syntax.SynType ty +FSharp.Compiler.Syntax.SynTypeSpread: FSharp.Compiler.Syntax.SynTypeSpread NewSynTypeSpread(FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynTypeSpread: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynTypeSpread: FSharp.Compiler.Text.Range get_spreadRange() +FSharp.Compiler.Syntax.SynTypeSpread: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynTypeSpread: FSharp.Compiler.Text.Range spreadRange +FSharp.Compiler.Syntax.SynTypeSpread: Int32 Tag +FSharp.Compiler.Syntax.SynTypeSpread: Int32 get_Tag() +FSharp.Compiler.Syntax.SynTypeSpread: System.String ToString() FSharp.Compiler.Syntax.SynUnionCase: FSharp.Compiler.Syntax.SynIdent get_ident() FSharp.Compiler.Syntax.SynUnionCase: FSharp.Compiler.Syntax.SynIdent ident FSharp.Compiler.Syntax.SynUnionCase: FSharp.Compiler.Syntax.SynUnionCase NewSynUnionCase(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynAttributeList], FSharp.Compiler.Syntax.SynIdent, FSharp.Compiler.Syntax.SynUnionCaseKind, FSharp.Compiler.Xml.PreXmlDoc, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynAccess], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynUnionCaseTrivia) @@ -10105,7 +10230,7 @@ FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOptio FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitModuleOrNamespaceSig(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], FSharp.Compiler.Syntax.SynModuleOrNamespaceSig) FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitModuleSigDecl(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], Microsoft.FSharp.Core.FSharpFunc`2[FSharp.Compiler.Syntax.SynModuleSigDecl,Microsoft.FSharp.Core.FSharpOption`1[T]], FSharp.Compiler.Syntax.SynModuleSigDecl) FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitPat(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], Microsoft.FSharp.Core.FSharpFunc`2[FSharp.Compiler.Syntax.SynPat,Microsoft.FSharp.Core.FSharpOption`1[T]], FSharp.Compiler.Syntax.SynPat) -FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitRecordDefn(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynField], FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitRecordDefn(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynFieldOrSpread], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitRecordField(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynLongIdent]) FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitSimplePats(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], FSharp.Compiler.Syntax.SynPat) FSharp.Compiler.Syntax.SyntaxVisitorBase`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] VisitType(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SyntaxNode], Microsoft.FSharp.Core.FSharpFunc`2[FSharp.Compiler.Syntax.SynType,Microsoft.FSharp.Core.FSharpOption`1[T]], FSharp.Compiler.Syntax.SynType) @@ -11277,6 +11402,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Dollar FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Done FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Dot FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 DotDot +FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 DotDotDot FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 DotDotHat FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 DownTo FSharp.Compiler.Tokenization.FSharpTokenKind+Tags: Int32 Downcast @@ -11475,6 +11601,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDollar FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDone FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDot FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDotDot +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDotDotDot FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDotDotHat FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDownTo FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean IsDowncast @@ -11669,6 +11796,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDollar() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDone() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDot() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDotDot() +FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDotDotDot() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDotDotHat() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDownTo() FSharp.Compiler.Tokenization.FSharpTokenKind: Boolean get_IsDowncast() @@ -11863,6 +11991,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Done FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Dot FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind DotDot +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind DotDotDot FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind DotDotHat FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind DownTo FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind Downcast @@ -12057,6 +12186,7 @@ FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FShar FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Done() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Dot() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_DotDot() +FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_DotDotDot() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_DotDotHat() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_DownTo() FSharp.Compiler.Tokenization.FSharpTokenKind: FSharp.Compiler.Tokenization.FSharpTokenKind get_Downcast() @@ -12238,6 +12368,7 @@ FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 COMMENT FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 DO FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 DOT FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 DOT_DOT +FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 DOT_DOT_DOT FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 DOT_DOT_HAT FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 ELSE FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 EQUALS @@ -12302,6 +12433,7 @@ FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_COMMENT() FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_DO() FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_DOT() FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_DOT_DOT() +FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_DOT_DOT_DOT() FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_DOT_DOT_HAT() FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_ELSE() FSharp.Compiler.Tokenization.FSharpTokenTag: Int32 get_EQUALS() diff --git a/tests/FSharp.Compiler.Service.Tests/ParsedInputModuleTests.fs b/tests/FSharp.Compiler.Service.Tests/ParsedInputModuleTests.fs index f8168ed68e6..9061d9b8395 100644 --- a/tests/FSharp.Compiler.Service.Tests/ParsedInputModuleTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/ParsedInputModuleTests.fs @@ -2,6 +2,7 @@ module FSharp.Compiler.Service.Tests.ParsedInputModuleTests open FSharp.Compiler.Service.Tests.Common open FSharp.Compiler.Syntax +open FSharp.Compiler.SyntaxTreeOps open FSharp.Compiler.Text.Position open Xunit @@ -27,7 +28,7 @@ let ``tryPick record definition test`` () = (pos0, parseTree) ||> ParsedInput.tryPick (fun _path node -> match node with - | SyntaxNode.SynTypeDefn(SynTypeDefn(typeRepr = SynTypeDefnRepr.Simple(SynTypeDefnSimpleRepr.Record(recordFields = fields), _))) -> Some fields + | SyntaxNode.SynTypeDefn(SynTypeDefn(typeRepr = SynTypeDefnRepr.Simple(SynTypeDefnSimpleRepr.Record(recordFieldsAndSpreads = SynFields fields), _))) -> Some fields | _ -> None) match fields with @@ -145,7 +146,7 @@ type Y = (pos0, parseTree) ||> ParsedInput.tryPick (fun _path node -> match node with - | SyntaxNode.SynTypeDefnSig(SynTypeDefnSig(typeRepr = SynTypeDefnSigRepr.Simple(SynTypeDefnSimpleRepr.Record(recordFields = fields), _))) -> + | SyntaxNode.SynTypeDefnSig(SynTypeDefnSig(typeRepr = SynTypeDefnSigRepr.Simple(SynTypeDefnSimpleRepr.Record(recordFieldsAndSpreads = SynFields fields), _))) -> fields |> List.choose (function SynField(idOpt = Some ident) -> Some ident.idText | _ -> None) |> String.concat "," diff --git a/tests/FSharp.Compiler.Service.Tests/TreeVisitorTests.fs b/tests/FSharp.Compiler.Service.Tests/TreeVisitorTests.fs index 2895a53210c..9756671b368 100644 --- a/tests/FSharp.Compiler.Service.Tests/TreeVisitorTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/TreeVisitorTests.fs @@ -31,7 +31,7 @@ let ``Visit record definition test`` () = let parseTree = parseSourceCode("C:\\test.fs", source) match SyntaxTraversal.Traverse(pos0, parseTree, visitor) with - | Some [ SynField (idOpt = Some id1); SynField (idOpt = Some id2) ] when id1.idText = "A" && id2.idText = "B" -> () + | Some [ SynFieldOrSpread.Field (SynField (idOpt = Some id1)); SynFieldOrSpread.Field (SynField (idOpt = Some id2)) ] when id1.idText = "A" && id2.idText = "B" -> () | _ -> failwith "Did not visit record definition" [] @@ -123,7 +123,7 @@ let ``Visit Record in SynTypeDefnSig`` () = { new SyntaxVisitorBase<_>() with member x.VisitRecordDefn(path, fields, range) = fields - |> List.choose (fun (SynField(idOpt = idOpt)) -> idOpt |> Option.map (fun ident -> ident.idText)) + |> List.choose (function SynFieldOrSpread.Field (SynField(idOpt = idOpt)) -> idOpt |> Option.map (fun ident -> ident.idText) | _ -> None) |> String.concat "," |> Some } diff --git a/tests/FSharp.Compiler.Service.Tests/XmlDocTests.fs b/tests/FSharp.Compiler.Service.Tests/XmlDocTests.fs index 3e427293e25..ac0496de4fa 100644 --- a/tests/FSharp.Compiler.Service.Tests/XmlDocTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/XmlDocTests.fs @@ -1,9 +1,10 @@ -module FSharp.Compiler.Service.Tests.XmlDocTests +module FSharp.Compiler.Service.Tests.XmlDocTests open FSharp.Compiler.CodeAnalysis open FSharp.Compiler.Service.Tests.Common open FSharp.Compiler.Symbols open FSharp.Compiler.Syntax +open FSharp.Compiler.SyntaxTreeOps open FSharp.Test.Compiler open FSharp.Test.Assert open Xunit @@ -74,8 +75,8 @@ let (|UnionCases|) = function | x -> failwith $"Unexpected ParsedInput %A{x}" let (|Record|) = function - | Types(_, [SynTypeDefn(typeRepr = SynTypeDefnRepr.Simple(simpleRepr = SynTypeDefnSimpleRepr.Record(recordFields = fields)))]) - | TypeSigs(_, [SynTypeDefnSig(typeRepr = SynTypeDefnSigRepr.Simple(repr = SynTypeDefnSimpleRepr.Record(recordFields = fields)))]) -> + | Types(_, [SynTypeDefn(typeRepr = SynTypeDefnRepr.Simple(simpleRepr = SynTypeDefnSimpleRepr.Record(recordFieldsAndSpreads = SynFields fields)))]) + | TypeSigs(_, [SynTypeDefnSig(typeRepr = SynTypeDefnSigRepr.Simple(repr = SynTypeDefnSimpleRepr.Record(recordFieldsAndSpreads = SynFields fields)))]) -> Record(fields) | x -> failwith $"Unexpected ParsedInput %A{x}" 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..4b7277f1513 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 01.fs.bsl @@ -7,60 +7,69 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (3,5--3,6), - Quote - (Ident op_Quotation, false, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (3,12--3,13)), Const (Int32 1, (3,10--3,11)), - (3,10--3,13)), Const (Int32 1, (3,14--3,15)), - (3,10--3,15)), false, (3,7--3,18)))], (3,0--3,20), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,20)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (3,5--3,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (3,12--3,13)), Const (Int32 1, (3,10--3,11)), + (3,10--3,13)), Const (Int32 1, (3,14--3,15)), + (3,10--3,15)), false, (3,7--3,18)), (3,3--3,18)), + None)], (3,0--3,20), { OpeningBraceRange = (3,0--3,2) }), + (3,0--3,20)); Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (5,4--5,5), - Quote - (Ident op_Quotation, false, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (5,11--5,12)), Const (Int32 1, (5,9--5,10)), - (5,9--5,12)), Const (Int32 1, (5,13--5,14)), - (5,9--5,14)), false, (5,6--5,17)))], (5,0--5,20), - { OpeningBraceRange = (5,0--5,2) }), (5,0--5,20)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (5,4--5,5), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (5,11--5,12)), Const (Int32 1, (5,9--5,10)), + (5,9--5,12)), Const (Int32 1, (5,13--5,14)), + (5,9--5,14)), false, (5,6--5,17)), (5,2--5,17)), + None)], (5,0--5,20), { OpeningBraceRange = (5,0--5,2) }), + (5,0--5,20)); Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (7,5--7,6), - Quote - (Ident op_Quotation, false, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (7,12--7,13)), Const (Int32 1, (7,10--7,11)), - (7,10--7,13)), Const (Int32 1, (7,14--7,15)), - (7,10--7,15)), false, (7,7--7,18)))], (7,0--7,21), - { OpeningBraceRange = (7,0--7,2) }), (7,0--7,21))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (7,5--7,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (7,12--7,13)), Const (Int32 1, (7,10--7,11)), + (7,10--7,13)), Const (Int32 1, (7,14--7,15)), + (7,10--7,15)), false, (7,7--7,18)), (7,3--7,18)), + None)], (7,0--7,21), { OpeningBraceRange = (7,0--7,2) }), + (7,0--7,21))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,21), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] 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..0c4619eda96 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 02.fs.bsl @@ -7,60 +7,69 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (3,5--3,6), - Quote - (Ident op_QuotationUntyped, true, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (3,13--3,14)), Const (Int32 1, (3,11--3,12)), - (3,11--3,14)), Const (Int32 1, (3,15--3,16)), - (3,11--3,16)), false, (3,7--3,20)))], (3,0--3,22), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,22)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (3,5--3,6), + Quote + (Ident op_QuotationUntyped, true, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (3,13--3,14)), Const (Int32 1, (3,11--3,12)), + (3,11--3,14)), Const (Int32 1, (3,15--3,16)), + (3,11--3,16)), false, (3,7--3,20)), (3,3--3,20)), + None)], (3,0--3,22), { OpeningBraceRange = (3,0--3,2) }), + (3,0--3,22)); Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (5,4--5,5), - Quote - (Ident op_QuotationUntyped, true, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (5,12--5,13)), Const (Int32 1, (5,10--5,11)), - (5,10--5,13)), Const (Int32 1, (5,14--5,15)), - (5,10--5,15)), false, (5,6--5,19)))], (5,0--5,22), - { OpeningBraceRange = (5,0--5,2) }), (5,0--5,22)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (5,4--5,5), + Quote + (Ident op_QuotationUntyped, true, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (5,12--5,13)), Const (Int32 1, (5,10--5,11)), + (5,10--5,13)), Const (Int32 1, (5,14--5,15)), + (5,10--5,15)), false, (5,6--5,19)), (5,2--5,19)), + None)], (5,0--5,22), { OpeningBraceRange = (5,0--5,2) }), + (5,0--5,22)); Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (7,5--7,6), - Quote - (Ident op_QuotationUntyped, true, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (7,13--7,14)), Const (Int32 1, (7,11--7,12)), - (7,11--7,14)), Const (Int32 1, (7,15--7,16)), - (7,11--7,16)), false, (7,7--7,20)))], (7,0--7,23), - { OpeningBraceRange = (7,0--7,2) }), (7,0--7,23))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (7,5--7,6), + Quote + (Ident op_QuotationUntyped, true, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (7,13--7,14)), Const (Int32 1, (7,11--7,12)), + (7,11--7,14)), Const (Int32 1, (7,15--7,16)), + (7,11--7,16)), false, (7,7--7,20)), (7,3--7,20)), + None)], (7,0--7,23), { OpeningBraceRange = (7,0--7,2) }), + (7,0--7,23))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,23), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] 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..d319e9d8aed 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 03.fs.bsl @@ -7,78 +7,96 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (3,5--3,6), - Quote - (Ident op_Quotation, false, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (3,12--3,13)), Const (Int32 1, (3,10--3,11)), - (3,10--3,13)), Const (Int32 1, (3,14--3,15)), - (3,10--3,15)), false, (3,7--3,18))); - (SynLongIdent ([B], [], [None]), Some (3,22--3,23), - Quote - (Ident op_QuotationUntyped, true, - Const - (String ("test", Regular, (3,28--3,34)), (3,28--3,34)), - false, (3,24--3,38)))], (3,0--3,40), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,40)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (3,5--3,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (3,12--3,13)), Const (Int32 1, (3,10--3,11)), + (3,10--3,13)), Const (Int32 1, (3,14--3,15)), + (3,10--3,15)), false, (3,7--3,18)), (3,3--3,18)), + Some ((3,18--3,19), Some (3,19))); + Field + (SynExprAnonRecordField + (SynLongIdent ([B], [], [None]), Some (3,22--3,23), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (3,28--3,34)), + (3,28--3,34)), false, (3,24--3,38)), (3,20--3,38)), + None)], (3,0--3,40), { OpeningBraceRange = (3,0--3,2) }), + (3,0--3,40)); Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (5,4--5,5), - Quote - (Ident op_Quotation, false, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (5,11--5,12)), Const (Int32 1, (5,9--5,10)), - (5,9--5,12)), Const (Int32 1, (5,13--5,14)), - (5,9--5,14)), false, (5,6--5,17))); - (SynLongIdent ([B], [], [None]), Some (5,21--5,22), - Quote - (Ident op_QuotationUntyped, true, - Const - (String ("test", Regular, (5,27--5,33)), (5,27--5,33)), - false, (5,23--5,37)))], (5,0--5,40), - { OpeningBraceRange = (5,0--5,2) }), (5,0--5,40)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (5,4--5,5), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (5,11--5,12)), Const (Int32 1, (5,9--5,10)), + (5,9--5,12)), Const (Int32 1, (5,13--5,14)), + (5,9--5,14)), false, (5,6--5,17)), (5,2--5,17)), + Some ((5,17--5,18), Some (5,18))); + Field + (SynExprAnonRecordField + (SynLongIdent ([B], [], [None]), Some (5,21--5,22), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (5,27--5,33)), + (5,27--5,33)), false, (5,23--5,37)), (5,19--5,37)), + None)], (5,0--5,40), { OpeningBraceRange = (5,0--5,2) }), + (5,0--5,40)); Expr (AnonRecd (false, None, - [(SynLongIdent ([A], [], [None]), Some (7,5--7,6), - Quote - (Ident op_Quotation, false, - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Addition], [], - [Some (OriginalNotation "+")]), None, - (7,12--7,13)), Const (Int32 1, (7,10--7,11)), - (7,10--7,13)), Const (Int32 1, (7,14--7,15)), - (7,10--7,15)), false, (7,7--7,18))); - (SynLongIdent ([B], [], [None]), Some (7,22--7,23), - Quote - (Ident op_QuotationUntyped, true, - Const - (String ("test", Regular, (7,28--7,34)), (7,28--7,34)), - false, (7,24--7,38)))], (7,0--7,41), - { OpeningBraceRange = (7,0--7,2) }), (7,0--7,41))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (7,5--7,6), + Quote + (Ident op_Quotation, false, + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Addition], [], + [Some (OriginalNotation "+")]), None, + (7,12--7,13)), Const (Int32 1, (7,10--7,11)), + (7,10--7,13)), Const (Int32 1, (7,14--7,15)), + (7,10--7,15)), false, (7,7--7,18)), (7,3--7,18)), + Some ((7,18--7,19), Some (7,19))); + Field + (SynExprAnonRecordField + (SynLongIdent ([B], [], [None]), Some (7,22--7,23), + Quote + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (7,28--7,34)), + (7,28--7,34)), false, (7,24--7,38)), (7,20--7,38)), + None)], (7,0--7,41), { OpeningBraceRange = (7,0--7,2) }), + (7,0--7,41))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,41), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] 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..e0f12c90800 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonRecd - Quotation 04.fs.bsl @@ -7,57 +7,87 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([Outer], [], [None]), Some (3,9--3,10), - AnonRecd - (false, None, - [(SynLongIdent ([Inner], [], [None]), Some (3,20--3,21), + [Field + (SynExprAnonRecordField + (SynLongIdent ([Outer], [], [None]), Some (3,9--3,10), + AnonRecd + (false, None, + [Field + (SynExprAnonRecordField + (SynLongIdent ([Inner], [], [None]), + Some (3,20--3,21), + Quote + (Ident op_Quotation, false, + Const (Int32 1, (3,25--3,26)), false, + (3,22--3,29)), (3,14--3,29)), None)], + (3,11--3,31), { OpeningBraceRange = (3,11--3,13) }), + (3,3--3,31)), Some ((3,31--3,32), Some (3,32))); + Field + (SynExprAnonRecordField + (SynLongIdent ([Other], [], [None]), Some (3,39--3,40), Quote - (Ident op_Quotation, false, - Const (Int32 1, (3,25--3,26)), false, (3,22--3,29)))], - (3,11--3,31), { OpeningBraceRange = (3,11--3,13) })); - (SynLongIdent ([Other], [], [None]), Some (3,39--3,40), - Quote - (Ident op_QuotationUntyped, true, - Const - (String ("test", Regular, (3,45--3,51)), (3,45--3,51)), - false, (3,41--3,55)))], (3,0--3,57), - { OpeningBraceRange = (3,0--3,2) }), (3,0--3,57)); + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (3,45--3,51)), + (3,45--3,51)), false, (3,41--3,55)), (3,33--3,55)), + None)], (3,0--3,57), { OpeningBraceRange = (3,0--3,2) }), + (3,0--3,57)); Expr (AnonRecd (false, None, - [(SynLongIdent ([Outer], [], [None]), Some (5,8--5,9), - AnonRecd - (false, None, - [(SynLongIdent ([Inner], [], [None]), Some (5,19--5,20), + [Field + (SynExprAnonRecordField + (SynLongIdent ([Outer], [], [None]), Some (5,8--5,9), + AnonRecd + (false, None, + [Field + (SynExprAnonRecordField + (SynLongIdent ([Inner], [], [None]), + Some (5,19--5,20), + Quote + (Ident op_Quotation, false, + Const (Int32 1, (5,24--5,25)), false, + (5,21--5,28)), (5,13--5,28)), None)], + (5,10--5,30), { OpeningBraceRange = (5,10--5,12) }), + (5,2--5,30)), Some ((5,30--5,31), Some (5,31))); + Field + (SynExprAnonRecordField + (SynLongIdent ([Other], [], [None]), Some (5,38--5,39), Quote - (Ident op_Quotation, false, - Const (Int32 1, (5,24--5,25)), false, (5,21--5,28)))], - (5,10--5,30), { OpeningBraceRange = (5,10--5,12) })); - (SynLongIdent ([Other], [], [None]), Some (5,38--5,39), - Quote - (Ident op_QuotationUntyped, true, - Const - (String ("test", Regular, (5,44--5,50)), (5,44--5,50)), - false, (5,40--5,54)))], (5,0--5,57), - { OpeningBraceRange = (5,0--5,2) }), (5,0--5,57)); + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (5,44--5,50)), + (5,44--5,50)), false, (5,40--5,54)), (5,32--5,54)), + None)], (5,0--5,57), { OpeningBraceRange = (5,0--5,2) }), + (5,0--5,57)); Expr (AnonRecd (false, None, - [(SynLongIdent ([Outer], [], [None]), Some (7,9--7,10), - AnonRecd - (false, None, - [(SynLongIdent ([Inner], [], [None]), Some (7,20--7,21), + [Field + (SynExprAnonRecordField + (SynLongIdent ([Outer], [], [None]), Some (7,9--7,10), + AnonRecd + (false, None, + [Field + (SynExprAnonRecordField + (SynLongIdent ([Inner], [], [None]), + Some (7,20--7,21), + Quote + (Ident op_Quotation, false, + Const (Int32 1, (7,25--7,26)), false, + (7,22--7,29)), (7,14--7,29)), None)], + (7,11--7,31), { OpeningBraceRange = (7,11--7,13) }), + (7,3--7,31)), Some ((7,31--7,32), Some (7,32))); + Field + (SynExprAnonRecordField + (SynLongIdent ([Other], [], [None]), Some (7,39--7,40), Quote - (Ident op_Quotation, false, - Const (Int32 1, (7,25--7,26)), false, (7,22--7,29)))], - (7,11--7,31), { OpeningBraceRange = (7,11--7,13) })); - (SynLongIdent ([Other], [], [None]), Some (7,39--7,40), - Quote - (Ident op_QuotationUntyped, true, - Const - (String ("test", Regular, (7,45--7,51)), (7,45--7,51)), - false, (7,41--7,55)))], (7,0--7,58), - { OpeningBraceRange = (7,0--7,2) }), (7,0--7,58))], + (Ident op_QuotationUntyped, true, + Const + (String ("test", Regular, (7,45--7,51)), + (7,45--7,51)), false, (7,41--7,55)), (7,33--7,55)), + None)], (7,0--7,58), { OpeningBraceRange = (7,0--7,2) }), + (7,0--7,58))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--7,58), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl index 7dbc5c7695b..1b6ede77ff8 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-01.fs.bsl @@ -7,15 +7,19 @@ ImplFile [Expr (AnonRecd (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([X], [], [None]), Some (1,5--1,6), + Const (Int32 1, (1,7--1,8)), (1,3--1,8)), None)], + (1,0--1,11), { OpeningBraceRange = (1,0--1,2) }), (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([Y], [], [None]), Some (2,12--2,13), + Const (Int32 2, (2,14--2,15)), (2,10--2,15)), None)], + (2,0--2,18), { OpeningBraceRange = (2,7--2,9) }), (2,0--2,18)); Expr (AnonRecd (false, None, [], (3,0--3,5), { OpeningBraceRange = (3,0--3,2) }), diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl index fc0a410b79e..c5c448e1dab 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-02.fs.bsl @@ -7,9 +7,11 @@ ImplFile [Expr (AnonRecd (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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([X], [], [None]), Some (1,5--1,6), + Const (Int32 0, (1,7--1,8)), (1,3--1,8)), None)], + (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl index 4582e5eca53..d8c1e6ee62b 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-03.fs.bsl @@ -7,9 +7,11 @@ ImplFile [Expr (AnonRecd (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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([X], [], [None]), Some (1,12--1,13), + Const (Int32 0, (1,14--1,15)), (1,10--1,15)), None)], + (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl index 9994586b626..5541e335afa 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-06.fs.bsl @@ -20,18 +20,25 @@ ImplFile None, (1,4--1,7)), None, AnonRecd (false, Some (Ident x, ((1,15--1,19), 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))); - (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))], - PreXmlDocEmpty, [], None, (1,0--2,0), { LeadingKeyword = None })], - (true, true), { ConditionalDirectives = [] - WarnDirectives = [] - CodeComments = [] }, set [])) + [Field + (SynExprAnonRecordField + (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)), + (1,20--1,29)), Some ((1,29--1,30), Some (1,30))); + Field + (SynExprAnonRecordField + (SynLongIdent ([A], [], [None]), Some (1,33--1,34), + Const (Int32 3, (1,35--1,36)), (1,31--1,36)), None)], + (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))], PreXmlDocEmpty, [], None, (1,0--2,0), + { LeadingKeyword = None })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) (1,0)-(2,0) parse warning The declarations in this file will be placed in an implicit module 'AnonymousRecords-06' based on the file name 'AnonymousRecords-06.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-07.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl index a8ff99d1b82..9221dc5414f 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-07.fs.bsl @@ -7,47 +7,59 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), - Const - (Measure - (Int32 1, (3,4--3,5), - 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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (3,3--3,4), + Const + (Measure + (Int32 1, (3,4--3,5), + 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,2--3,8)), None)], (3,0--3,11), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,11)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), - Const - (Measure - (Int32 1, (5,4--5,5), - 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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (5,3--5,4), + Const + (Measure + (Int32 1, (5,4--5,5), + 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,2--5,8)), None)], (5,0--5,10), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,10)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), - Const - (Measure - (Int32 1, (7,5--7,6), - 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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (7,4--7,5), + Const + (Measure + (Int32 1, (7,5--7,6), + 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,3--7,9)), None)], (7,0--7,11), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,11)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), - Const - (Measure - (Int32 1, (9,5--9,6), - 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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (9,4--9,5), + Const + (Measure + (Int32 1, (9,5--9,6), + 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,3--9,9)), None)], (9,0--9,12), + { OpeningBraceRange = (9,0--9,2) }), (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..126203ce6bf 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-08.fs.bsl @@ -7,75 +7,99 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), - Const - (Measure - (Int32 1, (3,4--3,5), - 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))); - (SynLongIdent ([b], [], [None]), Some (3,11--3,12), - Const - (Measure - (Int32 2, (3,12--3,13), - 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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (3,3--3,4), + Const + (Measure + (Int32 1, (3,4--3,5), + 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,2--3,8)), Some ((3,8--3,9), Some (3,9))); + Field + (SynExprAnonRecordField + (SynLongIdent ([b], [], [None]), Some (3,11--3,12), + Const + (Measure + (Int32 2, (3,12--3,13), + 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,10--3,16)), None)], (3,0--3,19), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,19)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), - Const - (Measure - (Int32 1, (5,4--5,5), - 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))); - (SynLongIdent ([b], [], [None]), Some (5,11--5,12), - Const - (Measure - (Int32 2, (5,12--5,13), - 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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (5,3--5,4), + Const + (Measure + (Int32 1, (5,4--5,5), + 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,2--5,8)), Some ((5,8--5,9), Some (5,9))); + Field + (SynExprAnonRecordField + (SynLongIdent ([b], [], [None]), Some (5,11--5,12), + Const + (Measure + (Int32 2, (5,12--5,13), + 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,10--5,16)), None)], (5,0--5,18), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,18)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), - Const - (Measure - (Int32 1, (7,5--7,6), - 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))); - (SynLongIdent ([b], [], [None]), Some (7,12--7,13), - Const - (Measure - (Int32 2, (7,13--7,14), - 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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (7,4--7,5), + Const + (Measure + (Int32 1, (7,5--7,6), + 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,3--7,9)), Some ((7,9--7,10), Some (7,10))); + Field + (SynExprAnonRecordField + (SynLongIdent ([b], [], [None]), Some (7,12--7,13), + Const + (Measure + (Int32 2, (7,13--7,14), + 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,11--7,17)), None)], (7,0--7,19), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,19)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), - Const - (Measure - (Int32 1, (9,5--9,6), - 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))); - (SynLongIdent ([b], [], [None]), Some (9,12--9,13), - Const - (Measure - (Int32 2, (9,13--9,14), - 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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (9,4--9,5), + Const + (Measure + (Int32 1, (9,5--9,6), + 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,3--9,9)), Some ((9,9--9,10), Some (9,10))); + Field + (SynExprAnonRecordField + (SynLongIdent ([b], [], [None]), Some (9,12--9,13), + Const + (Measure + (Int32 2, (9,13--9,14), + 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,11--9,17)), None)], (9,0--9,20), + { OpeningBraceRange = (9,0--9,2) }), (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..03288dd9864 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-09.fs.bsl @@ -7,39 +7,51 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (3,3--3,4), + TypeApp + (Ident typeof, (3,10--3,11), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (3,14--3,15), (3,10--3,15), (3,4--3,15)), + (3,2--3,15)), None)], (3,0--3,17), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,17)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (5,3--5,4), + TypeApp + (Ident typeof, (5,10--5,11), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (5,14--5,15), (5,10--5,15), (5,4--5,15)), + (5,2--5,15)), None)], (5,0--5,18), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,18)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (7,4--7,5), + TypeApp + (Ident typeof, (7,11--7,12), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (7,15--7,16), (7,11--7,16), (7,5--7,16)), + (7,3--7,16)), None)], (7,0--7,18), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,18)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), - TypeApp - (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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (9,4--9,5), + TypeApp + (Ident typeof, (9,11--9,12), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (9,15--9,16), (9,11--9,16), (9,5--9,16)), + (9,3--9,16)), None)], (9,0--9,19), + { OpeningBraceRange = (9,0--9,2) }), (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..030773fa567 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-10.fs.bsl @@ -7,46 +7,58 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), - TypeApp - (Ident typedefof, (3,13--3,14), - [App - (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)))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (3,3--3,4), + TypeApp + (Ident typedefof, (3,13--3,14), + [App + (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,2--3,23)), None)], (3,0--3,25), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,25)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), - TypeApp - (Ident typedefof, (5,13--5,14), - [App - (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)))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (5,3--5,4), + TypeApp + (Ident typedefof, (5,13--5,14), + [App + (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,2--5,23)), None)], (5,0--5,26), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,26)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), - TypeApp - (Ident typedefof, (7,14--7,15), - [App - (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)))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (7,4--7,5), + TypeApp + (Ident typedefof, (7,14--7,15), + [App + (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,3--7,24)), None)], (7,0--7,26), { OpeningBraceRange = (7,0--7,2) }), (7,0--7,26)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), - TypeApp - (Ident typedefof, (9,14--9,15), - [App - (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)))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (9,4--9,5), + TypeApp + (Ident typedefof, (9,14--9,15), + [App + (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,3--9,24)), None)], (9,0--9,27), { OpeningBraceRange = (9,0--9,2) }), (9,0--9,27))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--9,27), { LeadingKeyword = Module (1,0--1,6) })], (true, true), diff --git a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl index 180ed425c9e..68c6f21dbd1 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-11.fs.bsl @@ -23,16 +23,18 @@ ImplFile false)), Pats [], None, (3,4--3,9)), None, AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (3,15--3,16), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (3,15--3,16), + TypeApp + (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,14--3,26)), None)], (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)); Let (false, [SynBinding @@ -52,16 +54,18 @@ ImplFile false)), Pats [], None, (5,4--5,9)), None, AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (5,15--5,16), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (5,15--5,16), + TypeApp + (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,14--5,26)), None)], (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)); Let (false, [SynBinding @@ -81,16 +85,18 @@ ImplFile false)), Pats [], None, (7,4--7,9)), None, AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (7,16--7,17), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (7,16--7,17), + TypeApp + (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,15--7,27)), None)], (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)); Let (false, [SynBinding @@ -110,16 +116,18 @@ ImplFile false)), Pats [], None, (9,4--9,9)), None, AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (9,16--9,17), - TypeApp - (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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (9,16--9,17), + TypeApp + (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,15--9,27)), None)], (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))], 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..af402e59a8a 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-12.fs.bsl @@ -7,39 +7,51 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (3,3--3,4), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (3,3--3,4), + TypeApp + (Ident id, (3,6--3,7), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (3,10--3,11), (3,6--3,11), (3,4--3,11)), + (3,2--3,11)), None)], (3,0--3,13), + { OpeningBraceRange = (3,0--3,2) }), (3,0--3,13)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (5,3--5,4), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (5,3--5,4), + TypeApp + (Ident id, (5,6--5,7), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (5,10--5,11), (5,6--5,11), (5,4--5,11)), + (5,2--5,11)), None)], (5,0--5,14), + { OpeningBraceRange = (5,0--5,2) }), (5,0--5,14)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (7,4--7,5), - TypeApp - (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)); + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (7,4--7,5), + TypeApp + (Ident id, (7,7--7,8), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (7,11--7,12), (7,7--7,12), (7,5--7,12)), + (7,3--7,12)), None)], (7,0--7,14), + { OpeningBraceRange = (7,0--7,2) }), (7,0--7,14)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (9,4--9,5), - TypeApp - (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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (9,4--9,5), + TypeApp + (Ident id, (9,7--9,8), + [LongIdent (SynLongIdent ([int], [], [None]))], [], + Some (9,11--9,12), (9,7--9,12), (9,5--9,12)), + (9,3--9,12)), None)], (9,0--9,15), + { OpeningBraceRange = (9,0--9,2) }), (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..2dc59a91f58 100644 --- a/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/AnonymousRecords-13.fs.bsl @@ -7,18 +7,24 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (3,4--3,5), - Quote - (Ident op_Quotation, false, Const (Int32 3, (3,9--3,10)), - false, (3,6--3,13)))], (3,0--3,16), + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (3,4--3,5), + Quote + (Ident op_Quotation, false, + Const (Int32 3, (3,9--3,10)), false, (3,6--3,13)), + (3,2--3,13)), None)], (3,0--3,16), { OpeningBraceRange = (3,0--3,2) }), (3,0--3,16)); Expr (AnonRecd (false, None, - [(SynLongIdent ([a], [], [None]), Some (5,4--5,5), - Quote - (Ident op_Quotation, false, Const (Int32 3, (5,9--5,10)), - false, (5,6--5,13)))], (5,0--5,15), + [Field + (SynExprAnonRecordField + (SynLongIdent ([a], [], [None]), Some (5,4--5,5), + Quote + (Ident op_Quotation, false, + Const (Int32 3, (5,9--5,10)), false, (5,6--5,13)), + (5,2--5,13)), None)], (5,0--5,15), { OpeningBraceRange = (5,0--5,2) }), (5,0--5,15))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--5,15), { LeadingKeyword = Module (1,0--1,6) })], (true, true), diff --git a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index 975d9cc4d21..f3df78d7645 100644 --- a/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/CopySynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -10,11 +10,12 @@ ImplFile [Expr (Record (None, Some (Ident foo, ((2,6--2,10), None)), - [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 [])) + [Field + (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 [])) 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 7c41f9d1d94..9628c27f2c3 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 1.fs.bsl @@ -41,16 +41,18 @@ ImplFile (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 ((7,4--8,2), 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 ((8,9--9,2), None)); - SynExprRecordField - ((SynLongIdent ([Y], [], [None]), true), Some (9,4--9,5), - 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))], + [Field + (SynExprRecordField + ((SynLongIdent ([X], [], [None]), true), Some (8,4--8,5), + Some (Const (Int32 42, (8,6--8,8))), (8,2--8,8), + Some ((8,9--9,2), None))); + Field + (SynExprRecordField + ((SynLongIdent ([Y], [], [None]), true), Some (9,4--9,5), + 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))], 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 0c8fe61edb4..26c754b183d 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritRecord - Field 2.fs.bsl @@ -13,21 +13,26 @@ ImplFile (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 ((4,30--5,4), 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 ((5,15--6,4), 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 ((6,19--7,4), None)); - 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))], + [Field + (SynExprRecordField + ((SynLongIdent ([Field1], [], [None]), true), + Some (5,11--5,12), Some (Const (Int32 1, (5,13--5,14))), + (5,4--5,14), Some ((5,15--6,4), None))); + Field + (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 ((6,19--7,4), None))); + Field + (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))], 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 7ad5d76dc22..c42ce30a602 100644 --- a/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/InheritSynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -16,12 +16,13 @@ ImplFile (Ident msg, (2,19--2,20), Some (2,23--2,24), (2,19--2,24)), (2,10--2,24), Some ((2,24--2,25), Some (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 ((2,31--2,32), Some (2,32)))], (2,0--2,34)), - (2,0--2,34))], PreXmlDocEmpty, [], None, (2,0--2,34), - { LeadingKeyword = None })], (true, true), + [Field + (SynExprRecordField + ((SynLongIdent ([X], [], [None]), true), + Some (2,28--2,29), Some (Const (Int32 1, (2,30--2,31))), + (2,26--2,31), Some ((2,31--2,32), Some (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/Expression/Record - Anon 01.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl index 409a6349663..0445032bf15 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 01.fs.bsl @@ -7,9 +7,11 @@ ImplFile [Expr (AnonRecd (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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([F], [], [None]), Some (3,5--3,6), + Const (Int32 1, (3,7--3,8)), (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 02.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl index abb4f9c61af..58e4aec01dc 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 02.fs.bsl @@ -7,8 +7,11 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([F], [], [None]), Some (3,5--3,6), - ArbitraryAfterError ("anonField", (3,3--3,4)))], (3,0--3,9), + [Field + (SynExprAnonRecordField + (SynLongIdent ([F], [], [None]), Some (3,5--3,6), + ArbitraryAfterError ("anonField", (3,3--3,4)), + (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 07.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl index 0a2441bca98..93ca847d598 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 07.fs.bsl @@ -7,10 +7,16 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([F1], [], [None]), Some (3,6--3,7), - 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), + [Field + (SynExprAnonRecordField + (SynLongIdent ([F1], [], [None]), Some (3,6--3,7), + Const (Int32 1, (3,8--3,9)), (3,3--3,9)), + Some ((3,10--4,3), None)); + Field + (SynExprAnonRecordField + (SynLongIdent ([F2], [], [None]), Some (4,6--4,7), + ArbitraryAfterError ("anonField", (4,3--4,5)), + (4,3--4,7)), None)], (3,0--4,10), { OpeningBraceRange = (3,0--3,2) }), (3,0--4,10))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,10), { LeadingKeyword = Module (1,0--1,6) })], (true, true), 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..7deb988ef57 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 08.fs.bsl @@ -7,10 +7,16 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([F1], [], [None]), Some (3,6--3,7), - Const (Int32 1, (3,8--3,9))); - (SynLongIdent ([F2], [], [None]), None, - ArbitraryAfterError ("anonField", (4,3--4,5)))], (3,0--4,8), + [Field + (SynExprAnonRecordField + (SynLongIdent ([F1], [], [None]), Some (3,6--3,7), + Const (Int32 1, (3,8--3,9)), (3,3--3,9)), + Some ((3,10--4,3), None)); + Field + (SynExprAnonRecordField + (SynLongIdent ([F2], [], [None]), None, + ArbitraryAfterError ("anonField", (4,3--4,5)), + (4,3--4,5)), None)], (3,0--4,8), { OpeningBraceRange = (3,0--3,2) }), (3,0--4,8))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--4,8), { LeadingKeyword = Module (1,0--1,6) })], (true, true), 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..dcaec38b40f 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 09.fs.bsl @@ -7,20 +7,27 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([F1], [], [None]), Some (3,6--3,7), - Const (Int32 1, (3,8--3,9))); - (SynLongIdent ([F2], [], [None]), Some (4,6--4,7), - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([F1], [], [None]), Some (3,6--3,7), + Const (Int32 1, (3,8--3,9)), (3,3--3,9)), + Some ((3,10--4,3), None)); + Field + (SynExprAnonRecordField + (SynLongIdent ([F2], [], [None]), Some (4,6--4,7), + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([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)), (4,3--5,9)), + None)], (3,0--5,12), { OpeningBraceRange = (3,0--3,2) }), + (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..d27d2f0a92e 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 10.fs.bsl @@ -7,13 +7,21 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([F1], [], [None]), Some (3,6--3,7), - Const (Int32 1, (3,8--3,9))); - (SynLongIdent ([F2], [], [None]), None, - 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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([F1], [], [None]), Some (3,6--3,7), + Const (Int32 1, (3,8--3,9)), (3,3--3,9)), + Some ((3,10--4,3), None)); + Field + (SynExprAnonRecordField + (SynLongIdent ([F2], [], [None]), None, + ArbitraryAfterError ("anonField", (4,3--4,5)), + (4,3--4,5)), Some ((4,6--5,3), None)); + Field + (SynExprAnonRecordField + (SynLongIdent ([F3], [], [None]), Some (5,6--5,7), + Const (Int32 3, (5,8--5,9)), (5,3--5,9)), None)], + (3,0--5,12), { OpeningBraceRange = (3,0--3,2) }), (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..91d64405a00 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Anon 11.fs.bsl @@ -7,18 +7,22 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([F1], [], [None]), Some (3,6--3,7), - App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([F1], [], [None]), Some (3,6--3,7), + App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([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,3--4,9)), + None)], (3,0--4,12), { OpeningBraceRange = (3,0--3,2) }), + (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 - Field 03.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl index 253ba19cef9..f6c12807fbd 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 03.fs.bsl @@ -7,10 +7,11 @@ ImplFile [Expr (Record (None, None, - [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))], + [Field + (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))], 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..32e8a91d42b 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 04.fs.bsl @@ -7,11 +7,13 @@ ImplFile [Expr (Record (None, None, - [SynExprRecordField - ((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))], + [Field + (SynExprRecordField + ((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))], 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..e62af9ef893 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 05.fs.bsl @@ -7,9 +7,10 @@ ImplFile [Expr (Record (None, None, - [SynExprRecordField - ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), - Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), None)], + [Field + (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))], 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 - Field 06.fs.bsl b/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl index 112d7a23329..e512bf1f76b 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 06.fs.bsl @@ -7,10 +7,11 @@ ImplFile [Expr (Record (None, None, - [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))], + [Field + (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))], 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 27b99f20b97..cb026a70eaf 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 08.fs.bsl @@ -7,13 +7,15 @@ ImplFile [Expr (Record (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 ((3,8--4,2), 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))], + [Field + (SynExprRecordField + ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), + Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), + Some ((3,8--4,2), None))); + Field + (SynExprRecordField + ((SynLongIdent ([B], [(4,3--4,4)], [None]), true), None, + None, (4,2--4,4), None))], (3,0--4,6)), (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 8da1bc6096b..31339e94541 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 09.fs.bsl @@ -7,13 +7,15 @@ ImplFile [Expr (Record (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 ((3,8--4,2), None)); - SynExprRecordField - ((SynLongIdent ([B], [], [None]), true), None, None, - (4,2--4,3), None)], (3,0--4,5)), (3,0--4,5))], + [Field + (SynExprRecordField + ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), + Some (Const (Int32 1, (3,6--3,7))), (3,2--3,7), + Some ((3,8--4,2), None))); + Field + (SynExprRecordField + ((SynLongIdent ([B], [], [None]), true), None, None, + (4,2--4,3), None))], (3,0--4,5)), (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..94a650502ec 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 11.fs.bsl @@ -7,9 +7,10 @@ ImplFile [Expr (Record (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))], + [Field + (SynExprRecordField + ((SynLongIdent ([A], [], [None]), true), Some (3,4--3,5), + None, (3,2--3,5), None))], (3,0--3,7)), (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..1108727015f 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 12.fs.bsl @@ -7,21 +7,22 @@ ImplFile [Expr (Record (None, None, - [SynExprRecordField - ((SynLongIdent ([F1], [], [None]), true), Some (3,5--3,6), - Some - (App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Equality], [], - [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))], + [Field + (SynExprRecordField + ((SynLongIdent ([F1], [], [None]), true), Some (3,5--3,6), + Some + (App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Equality], [], + [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))], 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 8ce8d350e90..80e4ca9e345 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 13.fs.bsl @@ -7,13 +7,15 @@ ImplFile [Expr (Record (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 ((3,9--4,2), 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))], + [Field + (SynExprRecordField + ((SynLongIdent ([F1], [], [None]), true), Some (3,5--3,6), + Some (Const (Int32 1, (3,7--3,8))), (3,2--3,8), + Some ((3,9--4,2), None))); + Field + (SynExprRecordField + ((SynLongIdent ([F2], [], [None]), true), Some (4,5--4,6), + None, (4,2--4,6), None))], (3,0--4,8)), (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 3de711bfbaf..6e81f3f63c2 100644 --- a/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Record - Field 14.fs.bsl @@ -7,25 +7,27 @@ ImplFile [Expr (Record (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 ((3,9--4,2), None)); - SynExprRecordField - ((SynLongIdent ([F2], [], [None]), true), Some (4,5--4,6), - Some - (App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Equality], [], - [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))], + [Field + (SynExprRecordField + ((SynLongIdent ([F1], [], [None]), true), Some (3,5--3,6), + Some (Const (Int32 1, (3,7--3,8))), (3,2--3,8), + Some ((3,9--4,2), None))); + Field + (SynExprRecordField + ((SynLongIdent ([F2], [], [None]), true), Some (4,5--4,6), + Some + (App + (NonAtomic, false, + App + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Equality], [], + [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))], 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..0efb8dff6a5 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecdWithStructKeyword.fs.bsl @@ -7,8 +7,10 @@ ImplFile [Expr (AnonRecd (true, None, - [(SynLongIdent ([Foo], [], [None]), Some (3,11--3,12), - Ident someValue)], (2,0--5,16), + [Field + (SynExprAnonRecordField + (SynLongIdent ([Foo], [], [None]), Some (3,11--3,12), + Ident someValue, (3,7--5,13)), None)], (2,0--5,16), { OpeningBraceRange = (3,4--3,6) }), (2,0--5,16)); Expr (AnonRecd diff --git a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl index e7e6666975a..ffa4b0d290b 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprAnonRecordContainsTheRangeOfTheEqualsSignInTheFields.fs.bsl @@ -10,13 +10,21 @@ ImplFile [Expr (AnonRecd (false, None, - [(SynLongIdent ([X], [], [None]), Some (2,5--2,6), - Const (Int32 5, (2,7--2,8))); - (SynLongIdent ([Y], [], [None]), Some (3,8--3,9), - 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))], + [Field + (SynExprAnonRecordField + (SynLongIdent ([X], [], [None]), Some (2,5--2,6), + Const (Int32 5, (2,7--2,8)), (2,3--2,8)), + Some ((2,9--3,3), None)); + Field + (SynExprAnonRecordField + (SynLongIdent ([Y], [], [None]), Some (3,8--3,9), + Const (Int32 6, (3,10--3,11)), (3,3--3,11)), + Some ((3,12--4,3), None)); + Field + (SynExprAnonRecordField + (SynLongIdent ([Z], [], [None]), Some (4,12--4,13), + Const (Int32 7, (4,14--4,15)), (4,3--4,15)), None)], + (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 = [] diff --git a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl index f403c248e54..51a046a2e9d 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprRecordContainsTheRangeOfTheEqualsSignInSynExprRecordField.fs.bsl @@ -10,22 +10,24 @@ ImplFile [Expr (Record (None, None, - [SynExprRecordField - ((SynLongIdent ([V], [], [None]), true), Some (2,4--2,5), - Some (Ident v), (2,2--2,7), Some ((2,8--3,2), None)); - SynExprRecordField - ((SynLongIdent ([X], [], [None]), true), Some (3,9--3,10), - Some - (App - (NonAtomic, false, - App + [Field + (SynExprRecordField + ((SynLongIdent ([V], [], [None]), true), Some (2,4--2,5), + Some (Ident v), (2,2--2,7), Some ((2,8--3,2), None))); + Field + (SynExprRecordField + ((SynLongIdent ([X], [], [None]), true), Some (3,9--3,10), + Some + (App (NonAtomic, false, App - (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 [])) + (NonAtomic, false, + App + (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 [])) diff --git a/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl index 03e2eefdfd4..4547a21d9b9 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprRecordFieldsContainCorrectAmountOfTrivia.fs.bsl @@ -8,59 +8,61 @@ ImplFile [Expr (Record (None, None, - [SynExprRecordField - ((SynLongIdent ([JobType], [], [None]), true), - Some (2,10--2,11), - Some - (App - (NonAtomic, false, - App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Equality], [], - [Some (OriginalNotation "=")]), None, - (5,13--5,14)), + [Field + (SynExprRecordField + ((SynLongIdent ([JobType], [], [None]), true), + Some (2,10--2,11), + Some + (App + (NonAtomic, false, App - (NonAtomic, false, + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Equality], [], + [Some (OriginalNotation "=")]), None, + (5,13--5,14)), App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Equality], [], - [Some (OriginalNotation "=")]), None, - (4,12--4,13)), + (NonAtomic, false, App - (NonAtomic, false, + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Equality], [], + [Some (OriginalNotation "=")]), + None, (4,12--4,13)), App - (NonAtomic, true, - LongIdent - (false, - SynLongIdent - ([op_Equality], [], - [Some (OriginalNotation "=")]), - None, (3,19--3,20)), + (NonAtomic, false, App - (NonAtomic, false, - Ident EsriBoundaryImport, - Ident FileToImport, (2,12--3,18)), - (2,12--3,20)), - App - (NonAtomic, false, Ident filePath, - Ident State, (3,21--4,11)), - (2,12--4,11)), (2,12--4,13)), - App - (NonAtomic, false, Ident state, Ident DryRun, - (4,14--5,12)), (2,12--5,12)), (2,12--5,14)), - LongIdent - (false, - 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 [])) + (NonAtomic, true, + LongIdent + (false, + SynLongIdent + ([op_Equality], [], + [Some (OriginalNotation "=")]), + None, (3,19--3,20)), + App + (NonAtomic, false, + Ident EsriBoundaryImport, + Ident FileToImport, (2,12--3,18)), + (2,12--3,20)), + App + (NonAtomic, false, Ident filePath, + Ident State, (3,21--4,11)), + (2,12--4,11)), (2,12--4,13)), + App + (NonAtomic, false, Ident state, + Ident DryRun, (4,14--5,12)), (2,12--5,12)), + (2,12--5,14)), + LongIdent + (false, + 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 [])) 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 813ba3344bd..3fe28d78c0d 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 07.fs.bsl @@ -8,10 +8,12 @@ ImplFile (Yes (3,0--3,20), Record (None, None, - [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)), + [Field + (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)), [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 cd8a867459d..1d1b067c93e 100644 --- a/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Named field 08.fs.bsl @@ -8,10 +8,12 @@ ImplFile (Yes (3,0--3,20), Record (None, None, - [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)), + [Field + (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)), [SynMatchClause (Record ([NamePatPairField diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl index af1c383c20c..5d1b952c47d 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fsi.bsl @@ -36,12 +36,14 @@ SigFile Simple (Record (Some (Internal (8,4--8,12)), - [SynField - ([], false, Some LongNameBarBarBarBarBarBarBar, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((10,12), FSharp.Compiler.Xml.XmlDocCollector), - None, (10,12--10,46), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some LongNameBarBarBarBarBarBarBar, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((10,12), FSharp.Compiler.Xml.XmlDocCollector), + None, (10,12--10,46), { LeadingKeyword = None + MutableKeyword = None }))], (8,4--11,9)), (8,4--11,9)), [Member (SynValSig diff --git a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl index bcbb3398842..dac61202112 100644 --- a/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl +++ b/tests/service/data/SyntaxTree/SignatureType/RangeOfSynTypeDefnSigRecordShouldEndAtLastMember.fsi.bsl @@ -13,12 +13,14 @@ SigFile Simple (Record (None, - [SynField - ([], false, Some Level, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((4,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (4,6--4,16), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some Level, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((4,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (4,6--4,16), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--4,18)), (4,4--4,18)), [Member (SynValSig diff --git a/tests/service/data/SyntaxTree/Type/Module Inside Record 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Module Inside Record 01.fs.bsl index 51daf2093d3..7cd55d881a9 100644 --- a/tests/service/data/SyntaxTree/Type/Module Inside Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Module Inside Record 01.fs.bsl @@ -13,12 +13,14 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some A, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((5,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,6--5,13), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some A, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((5,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,6--5,13), { LeadingKeyword = None + MutableKeyword = None }))], (5,4--5,15)), (5,4--5,15)), [], None, (4,5--5,15), { LeadingKeyword = Type (4,0--4,4) EqualsRange = Some (4,7--4,8) diff --git a/tests/service/data/SyntaxTree/Type/Module Same Indentation 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Module Same Indentation 01.fs.bsl index 9b9908dbd51..25aac01fb73 100644 --- a/tests/service/data/SyntaxTree/Type/Module Same Indentation 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Module Same Indentation 01.fs.bsl @@ -71,12 +71,14 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some Field, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((12,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (12,6--12,16), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some Field, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((12,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (12,6--12,16), { LeadingKeyword = None + MutableKeyword = None }))], (12,4--12,18)), (12,4--12,18)), [], None, (11,5--12,18), { LeadingKeyword = Type (11,0--11,4) EqualsRange = Some (11,7--11,8) diff --git a/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl b/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl index ad592dd5cbb..64f8987ac04 100644 --- a/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/RangeOfAttributesShouldBeIncludedInRecursiveTypes.fs.bsl @@ -87,24 +87,27 @@ ImplFile Simple (Record (Some (Internal (7,4--7,12)), - [SynField - ([], false, Some Hash, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((8,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (8,8--8,18), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, Some Foo, - App - (LongIdent (SynLongIdent ([Foo], [], [None])), - Some (9,17--9,18), - [Var (SynTypar (a, None, false), (9,18--9,20)); - Var (SynTypar (b, None, false), (9,22--9,24))], - [(9,20--9,21)], Some (9,24--9,25), false, - (9,14--9,25)), false, - PreXmlDoc ((9,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (9,8--9,25), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some Hash, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((8,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (8,8--8,18), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, Some Foo, + App + (LongIdent (SynLongIdent ([Foo], [], [None])), + Some (9,17--9,18), + [Var (SynTypar (a, None, false), (9,18--9,20)); + Var (SynTypar (b, None, false), (9,22--9,24))], + [(9,20--9,21)], Some (9,24--9,25), false, + (9,14--9,25)), false, + PreXmlDoc ((9,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (9,8--9,25), { LeadingKeyword = None + MutableKeyword = None }))], (7,4--10,5)), (7,4--10,5)), [], None, (6,4--10,5), { LeadingKeyword = And (6,0--6,3) EqualsRange = Some (6,56--6,57) diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl index e2c49be6c8e..c2cc6fa372b 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 01.fs.bsl @@ -12,11 +12,13 @@ ImplFile Simple (Record (None, - [SynField - ([], false, None, FromParseError (5,16--5,16), false, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,16), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, None, FromParseError (5,16--5,16), + false, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,16), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--6,5)), (4,4--6,5)), [], None, (3,5--6,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl index 3540dbcc68c..d13bde420d6 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 02.fs.bsl @@ -12,13 +12,15 @@ ImplFile Simple (Record (None, - [SynField - ([], false, None, FromParseError (5,24--5,24), true, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,24), - { LeadingKeyword = None - MutableKeyword = Some (5,8--5,15) })], (4,4--6,5)), - (4,4--6,5)), [], None, (3,5--6,5), + [Field + (SynField + ([], false, None, FromParseError (5,24--5,24), + true, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,24), + { LeadingKeyword = None + MutableKeyword = Some (5,8--5,15) }))], + (4,4--6,5)), (4,4--6,5)), [], None, (3,5--6,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) WithKeyword = None })], (3,0--6,5)); diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl index 353570298cd..a72aaf7d8d9 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 03.fs.bsl @@ -12,14 +12,16 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some F, - LongIdent (SynLongIdent ([int], [], [None])), true, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,31), - { LeadingKeyword = None - MutableKeyword = Some (5,8--5,15) })], (4,4--6,5)), - (4,4--6,5)), [], None, (3,5--6,5), + [Field + (SynField + ([], false, Some F, + LongIdent (SynLongIdent ([int], [], [None])), + true, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,31), + { LeadingKeyword = None + MutableKeyword = Some (5,8--5,15) }))], + (4,4--6,5)), (4,4--6,5)), [], None, (3,5--6,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) WithKeyword = None })], (3,0--6,5)); diff --git a/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl index 37ad416ff25..26111d2dfb2 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Access 04.fs.bsl @@ -12,12 +12,14 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some F, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,23), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some F, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,23), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--6,5)), (4,4--6,5)), [], None, (3,5--6,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl index 37da69f67aa..7b6786f818e 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 01.fs.bsl @@ -12,13 +12,15 @@ ImplFile Simple (Record (None, - [SynField - ([], false, None, FromParseError (5,15--5,15), true, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,15), - { LeadingKeyword = None - MutableKeyword = Some (5,8--5,15) })], (4,4--6,5)), - (4,4--6,5)), [], None, (3,5--6,5), + [Field + (SynField + ([], false, None, FromParseError (5,15--5,15), + true, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,15), + { LeadingKeyword = None + MutableKeyword = Some (5,8--5,15) }))], + (4,4--6,5)), (4,4--6,5)), [], None, (3,5--6,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) WithKeyword = None })], (3,0--6,5)); diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl index 7b80fa8e08f..dc42d7244dc 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 02.fs.bsl @@ -12,19 +12,23 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some F1, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,15), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, None, FromParseError (6,15--6,15), true, - PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (6,8--6,15), - { LeadingKeyword = None - MutableKeyword = Some (6,8--6,15) })], (4,4--7,5)), - (4,4--7,5)), [], None, (3,5--7,5), + [Field + (SynField + ([], false, Some F1, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,15), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, None, FromParseError (6,15--6,15), + true, + PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (6,8--6,15), + { LeadingKeyword = None + MutableKeyword = Some (6,8--6,15) }))], + (4,4--7,5)), (4,4--7,5)), [], None, (3,5--7,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) WithKeyword = None })], (3,0--7,5)); diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl index 64b6dba2775..cd6635ad1eb 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 03.fs.bsl @@ -12,18 +12,22 @@ ImplFile Simple (Record (None, - [SynField - ([], false, None, FromParseError (5,15--5,15), true, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,15), - { LeadingKeyword = None - MutableKeyword = Some (5,8--5,15) }); - SynField - ([], false, Some F2, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (6,8--6,15), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, None, FromParseError (5,15--5,15), + true, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,15), + { LeadingKeyword = None + MutableKeyword = Some (5,8--5,15) })); + Field + (SynField + ([], false, Some F2, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (6,8--6,15), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--7,5)), (4,4--7,5)), [], None, (3,5--7,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl index c3b99f04619..143b61b6292 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 04.fs.bsl @@ -12,24 +12,30 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some F1, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,15), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, None, FromParseError (6,15--6,15), true, - PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (6,8--6,15), - { LeadingKeyword = None - MutableKeyword = Some (6,8--6,15) }); - SynField - ([], false, Some F3, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((7,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (7,8--7,15), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some F1, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,15), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, None, FromParseError (6,15--6,15), + true, + PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (6,8--6,15), + { LeadingKeyword = None + MutableKeyword = Some (6,8--6,15) })); + Field + (SynField + ([], false, Some F3, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((7,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (7,8--7,15), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--8,5)), (4,4--8,5)), [], None, (3,5--8,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) diff --git a/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl index 6443e19b43b..3c2d00eb5cc 100644 --- a/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record - Mutable 05.fs.bsl @@ -12,25 +12,31 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some F1, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,15), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, Some F2, - LongIdent (SynLongIdent ([int], [], [None])), true, - PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (6,8--6,23), - { LeadingKeyword = None - MutableKeyword = Some (6,8--6,15) }); - SynField - ([], false, Some F3, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((7,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (7,8--7,15), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some F1, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,15), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, Some F2, + LongIdent (SynLongIdent ([int], [], [None])), + true, + PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (6,8--6,23), + { LeadingKeyword = None + MutableKeyword = Some (6,8--6,15) })); + Field + (SynField + ([], false, Some F3, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((7,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (7,8--7,15), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--8,5)), (4,4--8,5)), [], None, (3,5--8,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) diff --git a/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl index ce490f4890d..e7befb107f3 100644 --- a/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 01.fs.bsl @@ -12,17 +12,21 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some Invest, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,19), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, Some T, FromParseError (6,9--6,9), false, - PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (6,8--6,9), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some Invest, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,19), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, Some T, FromParseError (6,9--6,9), + false, + PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (6,8--6,9), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--7,5)), (4,4--7,5)), [], None, (3,5--7,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,8--3,9) diff --git a/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl index 2805bef72c4..f7ad773e985 100644 --- a/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 02.fs.bsl @@ -12,18 +12,21 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some Invest, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,8--5,19), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, Some T, FromParseError (6,11--6,11), - false, - PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), - None, (6,8--6,11), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some Invest, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,8--5,19), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, Some T, FromParseError (6,11--6,11), + false, + PreXmlDoc ((6,8), FSharp.Compiler.Xml.XmlDocCollector), + None, (6,8--6,11), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--7,5)), (4,4--7,5)), [], None, (3,5--7,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,8--3,9) diff --git a/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl index bc34db45a45..62d89315400 100644 --- a/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 04.fs.bsl @@ -12,11 +12,12 @@ ImplFile Simple (Record (None, - [SynField - ([], false, None, FromParseError (5,6--5,6), false, - PreXmlDoc ((5,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,6--5,6), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, None, FromParseError (5,6--5,6), false, + PreXmlDoc ((5,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,6--5,6), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--6,5)), (4,4--6,5)), [], None, (3,5--6,5), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) diff --git a/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl b/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl index 65f78f4d5d3..5b7f1e20345 100644 --- a/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/Record 05.fs.bsl @@ -12,23 +12,28 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some F1, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((4,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (4,6--4,13), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, None, FromParseError (5,6--5,6), false, - PreXmlDoc ((5,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (5,6--5,6), { LeadingKeyword = None - MutableKeyword = None }); - SynField - ([], false, Some F3, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((6,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (6,6--6,13), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some F1, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((4,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (4,6--4,13), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, None, FromParseError (5,6--5,6), false, + PreXmlDoc ((5,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (5,6--5,6), { LeadingKeyword = None + MutableKeyword = None })); + Field + (SynField + ([], false, Some F3, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((6,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (6,6--6,13), { LeadingKeyword = None + MutableKeyword = None }))], (4,4--6,15)), (4,4--6,15)), [], None, (3,5--6,15), { LeadingKeyword = Type (3,0--3,4) EqualsRange = Some (3,7--3,8) diff --git a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl index 7cb9f5a2af5..993fcc36e63 100644 --- a/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Type/SynTypeDefnWithRecordContainsTheRangeOfTheWithKeyword.fs.bsl @@ -16,12 +16,14 @@ ImplFile Simple (Record (None, - [SynField - ([], false, Some Bar, - LongIdent (SynLongIdent ([int], [], [None])), false, - PreXmlDoc ((3,6), FSharp.Compiler.Xml.XmlDocCollector), - None, (3,6--3,15), { LeadingKeyword = None - MutableKeyword = None })], + [Field + (SynField + ([], false, Some Bar, + LongIdent (SynLongIdent ([int], [], [None])), + false, + PreXmlDoc ((3,6), FSharp.Compiler.Xml.XmlDocCollector), + None, (3,6--3,15), { LeadingKeyword = None + MutableKeyword = None }))], (3,4--3,17)), (3,4--3,17)), [Member (SynBinding diff --git a/vsintegration/tests/FSharp.Editor.Tests/SemanticClassificationServiceTests.fs b/vsintegration/tests/FSharp.Editor.Tests/SemanticClassificationServiceTests.fs index eae06773f68..5512947ad02 100644 --- a/vsintegration/tests/FSharp.Editor.Tests/SemanticClassificationServiceTests.fs +++ b/vsintegration/tests/FSharp.Editor.Tests/SemanticClassificationServiceTests.fs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. namespace FSharp.Editor.Tests