diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 9690a6c3c3d..cba5b45bd57 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -187,6 +187,7 @@ * Lines starting with `#:` are now ignored ([Language suggestion 1440](https://github.com/fsharp/fslang-suggestions/issues/1440), [RFC FS-1337](https://github.com/fsharp/fslang-design/pull/830), [PR #20212](https://github.com/dotnet/fsharp/pull/20212)) ### Breaking Changes +* Add `ExtendedLayoutAttribute` support for future .NET runtime interop. `ILTypeDefLayout` has a new `Extended` case. ([Issue #19190](https://github.com/dotnet/fsharp/issues/19190), [PR #19194](https://github.com/dotnet/fsharp/pull/19194)) * `FSharp.Compiler.Syntax.SynInterpolatedStringPart.FillExpr` now carries a `SynInterpolationFormatting` value (separating .NET alignment/format from printf specifiers) instead of an `Ident option`. ([PR #19971](https://github.com/dotnet/fsharp/pull/19971)) * Optimizer: don't inline named functions in debug builds ([PR #19548](https://github.com/dotnet/fsharp/pull/19548) diff --git a/src/Compiler/AbstractIL/il.fs b/src/Compiler/AbstractIL/il.fs index 0aa4e76ecf4..fc4f52ab15f 100644 --- a/src/Compiler/AbstractIL/il.fs +++ b/src/Compiler/AbstractIL/il.fs @@ -2572,6 +2572,7 @@ type ILTypeDefLayout = | Auto | Sequential of ILTypeDefLayoutInfo | Explicit of ILTypeDefLayoutInfo (* REVIEW: add field info here *) + | Extended and ILTypeDefLayoutInfo = { @@ -2685,6 +2686,10 @@ let convertLayout layout = | ILTypeDefLayout.Auto -> TypeAttributes.AutoLayout | ILTypeDefLayout.Sequential _ -> TypeAttributes.SequentialLayout | ILTypeDefLayout.Explicit _ -> TypeAttributes.ExplicitLayout + | ILTypeDefLayout.Extended -> + // Extended layout is represented by TypeAttributes value 0x18 (both Sequential and Explicit bits set) + // See: https://github.com/dotnet/runtime/issues/102727 + enum (0x18) let convertEncoding encoding = match encoding with diff --git a/src/Compiler/AbstractIL/il.fsi b/src/Compiler/AbstractIL/il.fsi index 8e82bd176fb..842bd70246a 100644 --- a/src/Compiler/AbstractIL/il.fsi +++ b/src/Compiler/AbstractIL/il.fsi @@ -1498,6 +1498,7 @@ type ILTypeDefLayout = | Auto | Sequential of ILTypeDefLayoutInfo | Explicit of ILTypeDefLayoutInfo + | Extended type internal ILTypeDefLayoutInfo = { Size: int32 option diff --git a/src/Compiler/AbstractIL/ilprint.fs b/src/Compiler/AbstractIL/ilprint.fs index f1fb38174c9..23aaab6c95c 100644 --- a/src/Compiler/AbstractIL/ilprint.fs +++ b/src/Compiler/AbstractIL/ilprint.fs @@ -776,6 +776,7 @@ let splitTypeLayout = | ILTypeDefLayout.Auto -> "auto", (fun _os () -> ()) | ILTypeDefLayout.Sequential info -> "sequential", (fun os () -> output_type_layout_info os info) | ILTypeDefLayout.Explicit info -> "explicit", (fun os () -> output_type_layout_info os info) + | ILTypeDefLayout.Extended -> "extended", (fun _os () -> ()) let goutput_fdefs tref env os (fdefs: ILFieldDefs) = for f in fdefs.AsList() do diff --git a/src/Compiler/AbstractIL/ilread.fs b/src/Compiler/AbstractIL/ilread.fs index bc31548cbdd..3ec5046a580 100644 --- a/src/Compiler/AbstractIL/ilread.fs +++ b/src/Compiler/AbstractIL/ilread.fs @@ -2064,6 +2064,8 @@ and typeLayoutOfFlags (ctxt: ILMetadataReader) mdv flags tidx = ILTypeDefLayout.Sequential(seekReadClassLayout ctxt mdv tidx) elif f = 0x00000010 then ILTypeDefLayout.Explicit(seekReadClassLayout ctxt mdv tidx) + elif f = 0x00000018 then + ILTypeDefLayout.Extended else ILTypeDefLayout.Auto @@ -2136,6 +2138,8 @@ and typeDefReader ctxtH : ILTypeDefStored = let super = seekReadSuperType ctxt numTypars AsObject extendsIdx let layout = typeLayoutOfFlags ctxt mdv flags idx + // Only Explicit layout has per-field offsets in the FieldLayout metadata table. + // Sequential and Extended layouts don't use FieldLayout rows. let hasLayout = match layout with | ILTypeDefLayout.Explicit _ -> true diff --git a/src/Compiler/AbstractIL/ilreflect.fs b/src/Compiler/AbstractIL/ilreflect.fs index 9aa9d6403a0..ece995f44ed 100644 --- a/src/Compiler/AbstractIL/ilreflect.fs +++ b/src/Compiler/AbstractIL/ilreflect.fs @@ -2138,6 +2138,7 @@ let typeAttributesOfTypeLayout cenv emEnv x = | ILTypeDefLayout.Auto -> None | ILTypeDefLayout.Explicit p -> (attr 0x02 p) | ILTypeDefLayout.Sequential p -> (attr 0x00 p) + | ILTypeDefLayout.Extended -> None // No StructLayoutAttribute needed; user's ExtendedLayoutAttribute is preserved //---------------------------------------------------------------------------- // buildTypeDefPass1 cenv diff --git a/src/Compiler/AbstractIL/ilwrite.fs b/src/Compiler/AbstractIL/ilwrite.fs index f626e1e56ef..0198225f57a 100644 --- a/src/Compiler/AbstractIL/ilwrite.fs +++ b/src/Compiler/AbstractIL/ilwrite.fs @@ -2916,6 +2916,7 @@ let rec GenTypeDefPass3 enc cenv (tdef: ILTypeDef) = // ClassLayout entry if needed match tdef.Layout with | ILTypeDefLayout.Auto -> () + | ILTypeDefLayout.Extended -> () // No ClassLayout row for Extended; bits are in TypeAttributes | ILTypeDefLayout.Sequential layout | ILTypeDefLayout.Explicit layout -> if Option.isSome layout.Pack || Option.isSome layout.Size then AddUnsharedRow cenv TableNames.ClassLayout diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index 9d48a88a95f..6276e6f4345 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -3547,7 +3547,12 @@ module EstablishTypeDefinitionCores = match attrs with | EntityAttribInt g WellKnownEntityAttributes.StructLayoutAttribute v -> Some v | _ -> None + let hasExtendedLayoutAttr = + match g.attrib_ExtendedLayoutAttribute_opt with + | Some attrib -> HasFSharpAttribute g attrib attrs + | None -> false let hasAllowNullLiteralAttr = hasFlag entityFlags WellKnownEntityAttributes.AllowNullLiteralAttribute_True + let hasStructAttr = hasFlag entityFlags WellKnownEntityAttributes.StructAttribute if hasAbstractAttr then tycon.TypeContents.tcaug_abstract <- true @@ -3567,7 +3572,13 @@ module EstablishTypeDefinitionCores = let structLayoutAttributeCheck allowed = let explicitKind = int32 System.Runtime.InteropServices.LayoutKind.Explicit + // LayoutKind.Extended has enum value 1 in .NET 11+ (previously unused slot) + // It cannot be specified via StructLayoutAttribute - users must use ExtendedLayoutAttribute instead + // See: https://github.com/dotnet/runtime/issues/102727 + let extendedLayoutKind = 1 match structLayoutAttr with + | Some kind when kind = extendedLayoutKind -> + errorR (Error(FSComp.SR.tcInvalidStructLayoutExtendedKind(), m)) | Some kind -> if allowed then if kind = explicitKind then @@ -3577,9 +3588,32 @@ module EstablishTypeDefinitionCores = else errorR (Error(FSComp.SR.tcGenericTypesCannotHaveStructLayout(), m)) | None -> () + + let extendedLayoutAttributeCheck () = + if hasExtendedLayoutAttr then + // Check not combined with StructLayoutAttribute + if structLayoutAttr.IsSome then + errorR (Error(FSComp.SR.tcStructLayoutAndExtendedLayout(), m)) + + let noExtendedLayoutAttributeCheck () = + if hasExtendedLayoutAttr then + errorR (Error(FSComp.SR.tcOnlyStructsCanHaveExtendedLayout(), m)) + + // Records become value types when marked []. Extended layout is valid on those + // (subject to the StructLayout conflict check); reference-typed records still reject it. + let recordExtendedLayoutAttributeCheck () = + if hasStructAttr then extendedLayoutAttributeCheck () + else noExtendedLayoutAttributeCheck () + + // A discriminated union (including a [] one) carries a case tag plus per-case fields, + // which is incompatible with the CStruct/CUnion field layout, so extended layout is never valid. + let unionExtendedLayoutAttributeCheck () = + if hasExtendedLayoutAttr then + errorR (Error(FSComp.SR.tcExtendedLayoutCannotBeUsedOnUnions(), m)) let hiddenReprChecks hasRepr = structLayoutAttributeCheck false + noExtendedLayoutAttributeCheck() if hasSealedAttr = Some false || (hasRepr && hasSealedAttr <> Some true && not (id.idText = "Unit" && g.compilingFSharpCore) ) then errorR(Error(FSComp.SR.tcRepresentationOfTypeHiddenBySignature(), m)) if hasAbstractAttr then @@ -3673,6 +3707,7 @@ module EstablishTypeDefinitionCores = | TyconCoreAbbrevThatIsReallyAUnion (hasMeasureAttr, envinner, id) (unionCaseName, _) -> structLayoutAttributeCheck false + unionExtendedLayoutAttributeCheck() noAllowNullLiteralAttributeCheck() let hasRQAAttribute = EntityHasWellKnownAttribute cenv.g WellKnownEntityAttributes.RequireQualifiedAccessAttribute tycon @@ -3689,7 +3724,8 @@ module EstablishTypeDefinitionCores = errorR (Error(FSComp.SR.tcAbbreviatedTypesCannotBeSealed(), m)) noAbstractClassAttributeCheck() noAllowNullLiteralAttributeCheck() - if hasMeasureableAttr then + noExtendedLayoutAttributeCheck() + if hasMeasureableAttr then let kind = if hasMeasureAttr then TyparKind.Measure else TyparKind.Type let theTypeAbbrev, _ = TcTypeOrMeasureAndRecover (Some kind) cenv NoNewTypars CheckCxs ItemOccurrence.UseInType WarnOnIWSAM.No envinner tpenv rhsType @@ -3706,6 +3742,7 @@ module EstablishTypeDefinitionCores = noAbstractClassAttributeCheck() noAllowNullLiteralAttributeCheck() structLayoutAttributeCheck false + unionExtendedLayoutAttributeCheck() let hasRQAAttribute = EntityHasWellKnownAttribute cenv.g WellKnownEntityAttributes.RequireQualifiedAccessAttribute tycon let unionCases = TcRecdUnionAndEnumDeclarations.TcUnionCaseDecls cenv envinner innerParent thisTy thisTyInst hasRQAAttribute tpenv addFixup unionCases @@ -3722,6 +3759,7 @@ module EstablishTypeDefinitionCores = noAbstractClassAttributeCheck() noAllowNullLiteralAttributeCheck() structLayoutAttributeCheck true // these are allowed for records + recordExtendedLayoutAttributeCheck() let check pass = let firstPass = pass = FirstPass @@ -3879,6 +3917,7 @@ module EstablishTypeDefinitionCores = noSealedAttributeCheck FSComp.SR.tcTypesAreAlwaysSealedAssemblyCode noAllowNullLiteralAttributeCheck() structLayoutAttributeCheck false + noExtendedLayoutAttributeCheck() noAbstractClassAttributeCheck() (TAsmRepr s, None, NoSafeInitInfo), ignore @@ -3949,17 +3988,20 @@ module EstablishTypeDefinitionCores = if not (isNil slotsigs) then errorR (Error(FSComp.SR.tcStructTypesCannotContainAbstractMembers(), m)) structLayoutAttributeCheck true + extendedLayoutAttributeCheck() TFSharpStruct | SynTypeDefnKind.Interface -> if hasSealedAttr = Some true then errorR (Error(FSComp.SR.tcInterfaceTypesCannotBeSealed(), m)) structLayoutAttributeCheck false + noExtendedLayoutAttributeCheck() noAbstractClassAttributeCheck() allowNullLiteralAttributeCheck() noFieldsCheck userFields TFSharpInterface | SynTypeDefnKind.Class -> structLayoutAttributeCheck(not isIncrClass) + noExtendedLayoutAttributeCheck() allowNullLiteralAttributeCheck() for slot in abstractSlots do if not slot.IsInstanceMember then @@ -3968,6 +4010,7 @@ module EstablishTypeDefinitionCores = | SynTypeDefnKind.Delegate (ty, arity) -> noSealedAttributeCheck FSComp.SR.tcTypesAreAlwaysSealedDelegate structLayoutAttributeCheck false + noExtendedLayoutAttributeCheck() noAllowNullLiteralAttributeCheck() noAbstractClassAttributeCheck() noFieldsCheck userFields @@ -4039,6 +4082,7 @@ module EstablishTypeDefinitionCores = let fieldTy, fields' = TcRecdUnionAndEnumDeclarations.TcEnumDecls cenv envinner tpenv innerParent thisTy decls let kind = TFSharpEnum structLayoutAttributeCheck false + noExtendedLayoutAttributeCheck() noSealedAttributeCheck FSComp.SR.tcTypesAreAlwaysSealedEnum noAllowNullLiteralAttributeCheck() let vid = ident("value__", m) diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 999a26f683a..c6ec3c54925 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -12351,46 +12351,52 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option ILTypeDefLayout.Sequential { Size = Some 1; Pack = Some 0us }, ILDefaultPInvokeEncoding.Ansi | _ -> ILTypeDefLayout.Auto, ILDefaultPInvokeEncoding.Ansi - match tycon.Attribs with - | EntityAttrib g WellKnownEntityAttributes.StructLayoutAttribute (Attrib(_, - _, - [ AttribInt32Arg layoutKind ], - namedArgs, - _, - _, - _)) -> - let decoder = AttributeDecoder namedArgs - let ilPack = decoder.FindInt32 "Pack" 0x0 - let ilSize = decoder.FindInt32 "Size" 0x0 - - let tdEncoding = - match (decoder.FindInt32 "CharSet" 0x0) with - (* enumeration values for System.Runtime.InteropServices.CharSet taken from mscorlib.il *) - | 0x03 -> ILDefaultPInvokeEncoding.Unicode - | 0x04 -> ILDefaultPInvokeEncoding.Auto - | _ -> ILDefaultPInvokeEncoding.Ansi - - let layoutInfo = - if ilPack = 0x0 && ilSize = 0x0 then - { Size = None; Pack = None } - else - { - Size = Some ilSize - Pack = Some(uint16 ilPack) - } - - let tdLayout = - match layoutKind with - (* enumeration values for System.Runtime.InteropServices.LayoutKind taken from mscorlib.il *) - | 0x0 -> ILTypeDefLayout.Sequential layoutInfo - | 0x2 -> ILTypeDefLayout.Explicit layoutInfo - | _ -> ILTypeDefLayout.Auto - - tdLayout, tdEncoding - | EntityAttrib g WellKnownEntityAttributes.StructLayoutAttribute (Attrib(_, _, _, _, _, _, m)) -> - errorR (Error(FSComp.SR.ilStructLayoutAttributeCouldNotBeDecoded (), m)) - ILTypeDefLayout.Auto, ILDefaultPInvokeEncoding.Ansi - | _ -> defaultLayout () + // Check for ExtendedLayoutAttribute first + match g.attrib_ExtendedLayoutAttribute_opt with + | Some attrib when HasFSharpAttribute g attrib tycon.Attribs -> + ILTypeDefLayout.Extended, ILDefaultPInvokeEncoding.Ansi + | _ -> + + match tycon.Attribs with + | EntityAttrib g WellKnownEntityAttributes.StructLayoutAttribute (Attrib(_, + _, + [ AttribInt32Arg layoutKind ], + namedArgs, + _, + _, + _)) -> + let decoder = AttributeDecoder namedArgs + let ilPack = decoder.FindInt32 "Pack" 0x0 + let ilSize = decoder.FindInt32 "Size" 0x0 + + let tdEncoding = + match (decoder.FindInt32 "CharSet" 0x0) with + (* enumeration values for System.Runtime.InteropServices.CharSet taken from mscorlib.il *) + | 0x03 -> ILDefaultPInvokeEncoding.Unicode + | 0x04 -> ILDefaultPInvokeEncoding.Auto + | _ -> ILDefaultPInvokeEncoding.Ansi + + let layoutInfo = + if ilPack = 0x0 && ilSize = 0x0 then + { Size = None; Pack = None } + else + { + Size = Some ilSize + Pack = Some(uint16 ilPack) + } + + let tdLayout = + match layoutKind with + (* enumeration values for System.Runtime.InteropServices.LayoutKind taken from mscorlib.il *) + | 0x0 -> ILTypeDefLayout.Sequential layoutInfo + | 0x2 -> ILTypeDefLayout.Explicit layoutInfo + | _ -> ILTypeDefLayout.Auto + + tdLayout, tdEncoding + | EntityAttrib g WellKnownEntityAttributes.StructLayoutAttribute (Attrib(_, _, _, _, _, _, m)) -> + errorR (Error(FSComp.SR.ilStructLayoutAttributeCouldNotBeDecoded (), m)) + ILTypeDefLayout.Auto, ILDefaultPInvokeEncoding.Ansi + | _ -> defaultLayout () // if the type's layout is Explicit, ensure that each field has a valid offset let validateExplicit (fdef: ILFieldDef) = @@ -12417,6 +12423,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option match tdLayout with | ILTypeDefLayout.Explicit _ -> List.iter validateExplicit ilFieldDefs | ILTypeDefLayout.Sequential _ -> List.iter validateSequential ilFieldDefs + | ILTypeDefLayout.Extended -> List.iter validateSequential ilFieldDefs // Extended layout manages field layout via the attribute; FieldOffset is not allowed | _ -> () let tdef = diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt index ff21c378132..d00b425dd5f 100644 --- a/src/Compiler/FSComp.txt +++ b/src/Compiler/FSComp.txt @@ -1847,3 +1847,7 @@ featureRecordSpreads,"record type and expression spreads" 3908,xmlDocIncludeError,"XML documentation include error: %s" 3908,xmlDocIncludeError2,"XML documentation include error: Unable to include XML fragment '%s' of file '%s' -- %s" 3909,lexColonDirectiveMustBeFirst,"#: directives must start at the beginning of a line" +3910,tcStructLayoutAndExtendedLayout,"The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type" +3911,tcOnlyStructsCanHaveExtendedLayout,"Only structs may be given the 'ExtendedLayoutAttribute'" +3912,tcInvalidStructLayoutExtendedKind,"LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead." +3913,tcExtendedLayoutCannotBeUsedOnUnions,"The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions" diff --git a/src/Compiler/TypedTree/TcGlobals.fs b/src/Compiler/TypedTree/TcGlobals.fs index 3f983633574..c584e7c27fd 100644 --- a/src/Compiler/TypedTree/TcGlobals.fs +++ b/src/Compiler/TypedTree/TcGlobals.fs @@ -1493,6 +1493,7 @@ type TcGlobals( member val attrib_SystemObsolete = findSysAttrib "System.ObsoleteAttribute" member val attrib_IsByRefLikeAttribute_opt = tryFindSysAttrib "System.Runtime.CompilerServices.IsByRefLikeAttribute" member val attrib_DllImportAttribute = tryFindSysAttrib "System.Runtime.InteropServices.DllImportAttribute" + member val attrib_ExtendedLayoutAttribute_opt = tryFindSysAttrib "System.Runtime.InteropServices.ExtendedLayoutAttribute" member val attrib_TypeForwardedToAttribute = findSysAttrib "System.Runtime.CompilerServices.TypeForwardedToAttribute" diff --git a/src/Compiler/TypedTree/TcGlobals.fsi b/src/Compiler/TypedTree/TcGlobals.fsi index 709abfc5b18..3c637532db9 100644 --- a/src/Compiler/TypedTree/TcGlobals.fsi +++ b/src/Compiler/TypedTree/TcGlobals.fsi @@ -366,6 +366,8 @@ type internal TcGlobals = member attrib_DecimalConstantAttribute: BuiltinAttribInfo + member attrib_ExtendedLayoutAttribute_opt: BuiltinAttribInfo option + member attrib_SystemObsolete: BuiltinAttribInfo member attrib_IsByRefLikeAttribute_opt: BuiltinAttribInfo option diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf index b898e7a3800..2eb0678cc46 100644 --- a/src/Compiler/xlf/FSComp.txt.cs.xlf +++ b/src/Compiler/xlf/FSComp.txt.cs.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Neplatné omezení. Platné formuláře omezení zahrnují "T :> ISomeInterface\" pro omezení rozhraní a \"SomeConstrainingType<'T>\" pro vlastní omezení. Viz https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions Použití [<Struct>] u hodnot, funkcí a metod je povolené jenom u částečných aktivních definic vzorů. @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. Syntaxe expr1[expr2] je při použití jako argument nejednoznačná. Více informací: https://aka.ms/fsharp-index-notation. Pokud plánujete indexování nebo vytváření řezů, musíte použít expr1.[expr2] na pozici argumentu. Pokud voláte funkci s vícenásobnými curryfikovanými argumenty, přidejte mezi ně mezeru, třeba someFunction expr1 [expr2]. @@ -1902,6 +1917,11 @@ Statické vazby nelze přidat do rozšíření extrinsic. Zvažte použití „statického člena“. + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Pokud je typ sjednocení s více písmeny strukturou, musí být všechna pole se stejným názvem stejného typu. Toto pravidlo platí také pro vygenerovaný název Item v případě nepojmenovaných polí. diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf index 589a35f5a6e..2bd360f9e5e 100644 --- a/src/Compiler/xlf/FSComp.txt.de.xlf +++ b/src/Compiler/xlf/FSComp.txt.de.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Ungültige Einschränkung. Gültige Einschränkungsformen sind \"'T :> ISomeInterface\" für Schnittstelleneinschränkungen und\"SomeConstrainingType<'T>\" für Selbsteinschränkungen. Siehe https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions Die Verwendung von "[<Struct>]" für Werte, Funktionen und Methoden ist nur für partielle aktive Musterdefinitionen zulässig. @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. Die Syntax "expr1[expr2]" ist mehrdeutig, wenn sie als Argument verwendet wird. Siehe https://aka.ms/fsharp-index-notation. Wenn Sie indizieren oder aufteilen möchten, müssen Sie "expr1.[expr2]' in Argumentposition verwenden. Wenn Sie eine Funktion mit mehreren geschweiften Argumenten aufrufen, fügen Sie ein Leerzeichen dazwischen hinzu, z. B. "someFunction expr1 [expr2]". @@ -1902,6 +1917,11 @@ Statische Bindungen können extrinsischen Augmentationen nicht hinzugefügt werden. Verwenden Sie stattdessen "static member". + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Wenn ein Union-Typ mit mehreren Großbuchstaben eine Struktur ist, müssen alle Felder mit demselben Namen denselben Typ aufweisen. Diese Regel gilt auch für den generierten Elementnamen bei unbenannten Feldern. diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf index 222b0f9cdd7..22003e2d225 100644 --- a/src/Compiler/xlf/FSComp.txt.es.xlf +++ b/src/Compiler/xlf/FSComp.txt.es.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Restricción no válida. Los formularios de restricción válidos incluyen \"'T :> ISomeInterface\" para restricciones de interfaz y \"SomeConstrainingType<'T>\" para restricciones propias. Ver https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions El uso de "[<Struct>]" en valores, funciones y métodos solo se permite en definiciones de modelos activos parciales. @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. La sintaxis "expr1[expr2]" es ambigua cuando se usa como argumento. Vea https://aka.ms/fsharp-index-notation. Si piensa indexar o segmentar, debe usar "expr1.[expr2]" en la posición del argumento. Si se llama a una función con varios argumentos currificados, se agregará un espacio entre ellos, por ejemplo, "unaFunción expr1 [expr2]". @@ -1902,6 +1917,11 @@ No se pueden agregar enlaces estáticos a aumentos extrínsecos. Considere la posibilidad de usar un "miembro estático" en su lugar. + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Si un tipo de unión multicase es un struct, todos los campos con el mismo nombre deben ser del mismo tipo. Esta regla se aplica también al nombre "Item" generado en el caso de campos sin nombre. diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf index e433626190b..f8c24d8d25e 100644 --- a/src/Compiler/xlf/FSComp.txt.fr.xlf +++ b/src/Compiler/xlf/FSComp.txt.fr.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Contrainte non valide. Les formes de contrainte valides incluent \"'T :> ISomeInterface\" pour les contraintes d’interface et \"SomeConstrainingType<'T>\" pour les contraintes automatiques. Consultez https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions L’utilisation de' [<Struct>] 'sur les valeurs, les fonctions et les méthodes n’est autorisée que sur les définitions de modèle actif partiel @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. La syntaxe « expr1[expr2] » est ambiguë lorsqu’elle est utilisée comme argument. Voir https://aka.ms/fsharp-index-notation. Si vous avez l’intention d’indexer ou de découper, vous devez utiliser « expr1.[expr2] » en position d’argument. Si vous appelez une fonction avec plusieurs arguments codés, ajoutez un espace entre eux, par exemple « someFunction expr1 [expr2] ». @@ -1902,6 +1917,11 @@ Les liaisons statiques ne peuvent pas être ajoutées aux augmentations extrinsèques. Pensez plutôt à utiliser un « membre statique ». + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Si un type union multicase est un struct, tous les champs portant le même nom doivent être du même type. Cette règle s’applique également au nom « Item » généré en cas de champs sans nom. diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf index 7eba9c9e86e..cdcb26698b8 100644 --- a/src/Compiler/xlf/FSComp.txt.it.xlf +++ b/src/Compiler/xlf/FSComp.txt.it.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Vincolo non valido. Forme di vincoli validi includono \"'T :> ISomeInterface\" per i vincoli di interfaccia e \"SomeConstrainingType<'T>\" per i vincoli automatici. Vedere https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions L'utilizzo di '[<Struct>]' su valori, funzioni e metodi è consentito solo per definizioni di criteri attivi parziali @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. La sintassi 'expr1[expr2]' è ambigua se usata come argomento. Vedere https://aka.ms/fsharp-index-notation. Se si intende eseguire l'indicizzazione o il sezionamento, è necessario usare 'expr1.[expr2]' nella posizione dell'argomento. Se si chiama una funzione con più argomenti sottoposti a corsi, aggiungere uno spazio tra di essi, ad esempio 'someFunction expr1 [expr2]'. @@ -1902,6 +1917,11 @@ Non è possibile aggiungere binding statici ad aumenti estrinseci. Prendi in considerazione un "membro statico", in alternativa. + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Se un tipo di unione multicase è uno struct, tutti i campi con lo stesso nome devono essere dello stesso tipo. Questa regola si applica anche al nome 'Elemento' generato in caso di campi senza nome. diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf index 59421c85192..4faa9c916a6 100644 --- a/src/Compiler/xlf/FSComp.txt.ja.xlf +++ b/src/Compiler/xlf/FSComp.txt.ja.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ 制約が無効です。有効な制約フォームには、インターフェイス制約の場合は \"'T :> ISomeInterface\"、自己制約の場合には \"SomeConstrainingType<'T>\" があります。https://aka.ms/fsharp-type-constraints を参照してください。 + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions 値、関数、およびメソッドでの '[<Struct>]' は、部分的なアクティブ パターンの定義でのみ使うことができます @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. 構文 'expr1[expr2]' は引数として使用されている場合、あいまいです。https://aka.ms/fsharp-index-notation を参照してください。インデックス作成またはスライスを行う場合は、'expr1.[expr2]' を引数の位置に使用する必要があります。複数のカリー化された引数を持つ関数を呼び出す場合は、'expr1 [expr2]' のように間にスペースを追加します。 @@ -1902,6 +1917,11 @@ 静的バインディングを外部拡張に追加することはできません。代わりに'静的メンバー' を使用することを検討してください。 + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. マルチケース共用体型が構造体の場合、同じ名前を持つすべてのフィールドが同じ型である必要があります。このルールは、名前のないフィールドの場合に生成された 'Item' 名にも適用されます。 diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf index e03116ac48f..3d1d0158763 100644 --- a/src/Compiler/xlf/FSComp.txt.ko.xlf +++ b/src/Compiler/xlf/FSComp.txt.ko.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ 제약 조건이 잘못되었습니다. 유효한 제약 조건 양식은 인터페이스 제약 조건의 경우 \"'T :> ISomeInterface\", 자체 제약 조건의 경우 \"SomeConstrainingType<'T>\" 등입니다. https://aka.ms/fsharp-type-constraints를 참조하세요. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions 값, 함수 및 메서드에 '[<Struct>]'을(를) 사용하는 것은 부분 활성 패턴 정의에서만 허용됩니다. @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. 'expr1[expr2]' 구문은 인수로 사용될 때 모호합니다. https://aka.ms/fsharp-index-notation을 참조하세요. 인덱싱이나 슬라이싱을 하려면 인수 위치에 'expr1.[expr2]'를 사용해야 합니다. 여러 개의 커리된 인수로 함수를 호출하는 경우 그 사이에 공백을 추가하세요(예: 'someFunction expr1 [expr2]'). @@ -1902,6 +1917,11 @@ 정적 바인딩은 외적 증강에 추가할 수 없습니다. 대신 '정적 멤버'를 사용하는 것이 좋습니다. + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. 멀티캐시 공용 구조체 형식이 구조체이면 이름이 같은 모든 필드의 형식이 같아야 합니다. 이 규칙은 명명되지 않은 필드의 경우 생성된 '항목' 이름에도 적용됩니다. diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf index ef606df18a1..9b77586cc57 100644 --- a/src/Compiler/xlf/FSComp.txt.pl.xlf +++ b/src/Compiler/xlf/FSComp.txt.pl.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Nieprawidłowe ograniczenie. Prawidłowe formularze ograniczeń obejmują \"'T :> ISomeInterface\" for interface constraints and \"SomeConstrainingType<'T>\" dla ograniczeń własnych. Zobacz https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions Używanie elementu "[<Struct>]" w przypadku wartości, funkcji i metod jest dozwolone tylko w definicjach częściowo aktywnego wzorca @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. Składnia wyrażenia „expr1[expr2]” jest niejednoznaczna, gdy jest używana jako argument. Zobacz https://aka.ms/fsharp-index-notation. Jeśli zamierzasz indeksować lub fragmentować, to w pozycji argumentu musi być użyte wyrażenie „expr1.[expr2]”. Jeśli wywołujesz funkcję z wieloma argumentami typu curried, dodaj spację między nimi, np. „someFunction expr1 [expr2]”. @@ -1902,6 +1917,11 @@ Nie można dodać powiązań statycznych do rozszerzeń wewnętrznych. Zamiast tego rozważ użycie „statycznego elementu członkowskiego”. + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Jeśli typ unii wieloskładnikowej jest strukturą, wszystkie pola o tej samej nazwie muszą być tego samego typu. Ta reguła ma zastosowanie również do wygenerowanej nazwy „item” w przypadku pól bez nazwy. diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf index 6c94d5d189d..bb3f8738b13 100644 --- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf +++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Restrição inválida. Os formulários de restrição válidos incluem \"'T :> ISomeInterface\" para restrições de interface e \"SomeConstrainingType<'T>\" para auto-restrições. Confira https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions O uso de '[<Struct>]' em valores, funções e métodos somente é permitido em definições de padrões ativos parciais @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. A sintaxe '[expr1][expr2]' é ambígua quando usada como um argumento. Consulte https://aka.ms/fsharp-index-notation. Se você pretende indexar ou colocar em fatias, deve usar '(expr1).[expr2]' na posição do argumento. Se chamar uma função com vários argumentos na forma curried, adicione um espaço entre eles, por exemplo, 'someFunction [expr1] [expr2]'. @@ -1902,6 +1917,11 @@ Associações estáticas não podem ser adicionadas a aumentos extrínsecos. Considere usar um "membro estático". + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Se um tipo de união multicase for um struct, todos os campos com o mesmo nome deverão ser do mesmo tipo. Essa regra também se aplica ao nome 'Item' gerado no caso de campos sem nome. diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf index fc9b54f939f..50fd4214d1d 100644 --- a/src/Compiler/xlf/FSComp.txt.ru.xlf +++ b/src/Compiler/xlf/FSComp.txt.ru.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Недопустимое ограничение. Допустимые формы ограничения включают \"'T:> ISomeInterface\" для ограничений интерфейса и \"SomeConstrainingType<'T>\" для собственных ограничений. См. https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions Использование '[<Struct>]' для значений, функций и методов разрешено только для определений частичных активных шаблонов @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. Синтаксис "expr1[expr2]" неоднозначен при использовании в качестве аргумента. См. https://aka.ms/fsharp-index-notation. Если вы намереваетесь индексировать или разрезать, необходимо использовать "expr1.[expr2]" в позиции аргумента. При вызове функции с несколькими каррированными аргументами добавьте пробел между ними, например "someFunction expr1 [expr2]". @@ -1902,6 +1917,11 @@ Статические привязки нельзя добавлять к внешним расширениям. Вместо этого рекомендуется использовать "static member". + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Если тип объединения нескольких регистров является структурой, то все поля с одинаковым именем должны быть одного типа. Это правило также применяется к сгенерированному имени «Элемент» в случае безымянных полей. diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf index 5fa7d66e43b..1ec84647182 100644 --- a/src/Compiler/xlf/FSComp.txt.tr.xlf +++ b/src/Compiler/xlf/FSComp.txt.tr.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ Geçersiz kısıtlama. Geçerli kısıtlama formları arabirim kısıtlamaları için \"'T :> ISomeInterface\" ve kendi kendine kısıtlamalar için \"SomeConstrainingType<'T>\" içerir. Bkz. https://aka.ms/fsharp-type-constraints. + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions Değerler, işlevler ve yöntemler üzerinde '[<Struct>]' kullanımına yalnızca kısmi etkin model tanımlarında izin verilir @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. Söz dizimi “expr1[expr2]” artık dizin oluşturma için ayrılmıştır ve bağımsız değişken olarak kullanıldığında belirsizdir. https://aka.ms/fsharp-index-notation'a bakın. Dizin oluşturmayı veya dilimlemeyi düşünüyorsanız, bağımsız değişken konumunda “expr1.[expr2]” kullanmalısınız. Birden çok curry bağımsız değişkenli bir işlev çağırıyorsanız, aralarına bir boşluk ekleyin, örn. “someFunction expr1 [expr2]”. @@ -1902,6 +1917,11 @@ Statik bağlamalar dış genişletmelere eklenemez. Bunun yerine 'static member' kullanmayı düşünün. + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. Çok durumlu bir birleşim türü bir yapıysa, aynı ada sahip tüm alanların aynı türde olması gerekir. Bu kural adlandırılmamış alanlar olması durumunda oluşturulan ‘Öğe’ adı için de geçerlidir. diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf index ae8bab0bac3..a7a35cd23b3 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ 约束无效。有效的约束形式包括 \"'T :> ISomeInterface\" (接口约束)和 \"SomeConstrainingType<'T>\" (自我约束)。请参阅 https://aka.ms/fsharp-type-constraints。 + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions 只允许在部分活动模式定义中对值、函数和方法使用 "[<Struct>]" @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. 语法“expr1[expr2]”用作参数时不明确。请参阅 https://aka.ms/fsharp-index-notation。如果要索引或切片,则必须在参数位置使用“expr1.[expr2]”。如果使用多个扩充参数调用函数,请在它们之间添加空格,例如“someFunction expr1 [expr2]”。 @@ -1902,6 +1917,11 @@ 无法将静态绑定添加到外部增强。请考虑改用 "static member"。 + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. 如果多重联合类型是结构,则具有相同名称的所有字段必须具有相同的类型。对于未命名字段,此规则也适用于生成的“Item”名称。 diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf index 02b9a8f2b88..bf3fdd7f248 100644 --- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf @@ -1,4 +1,4 @@ - + @@ -1632,6 +1632,16 @@ 限制無效。有效的限制式表單包括 \「'T :>ISomeInterface\」介面限制和 \」SomeConstrainingType<'T>\」自我限制式。請參閱 https://aka.ms/fsharp-type-constraints。 + + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead. + + + + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions + + The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions 只允許在部分現用模式定義上對值、函式和方法使用 '[<Struct>]' @@ -1737,6 +1747,11 @@ The 'nullness checking' language feature is not enabled. This use of a nullness checking construct will be ignored. + + Only structs may be given the 'ExtendedLayoutAttribute' + Only structs may be given the 'ExtendedLayoutAttribute' + + The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. 語法 'expr1[expr2]' 用作引數時不明確。請參閱 https://aka.ms/fsharp-index-notation。如果您要編製索引或切割,則必須在引數位置使用 'expr1.[expr2]'。如果要呼叫具有多個調用引數的函式,請在它們之間新增空格,例如 'someFunction expr1 [expr2]'。 @@ -1902,6 +1917,11 @@ 無法將靜態繫結新增至外來擴充。請考慮改用「靜態成員」。 + + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type + + If a multicase union type is a struct, then all fields with the same name must be of the same type. This rule applies also to the generated 'Item' name in case of unnamed fields. 如果多寫聯集類型是結構,則所有具有相同名稱的欄位都必須是相同的類型。此規則也適用於未命名欄位時產生的 'Item' 名稱。 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs index d47e20daefc..5647000f3ba 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/Basic.fs @@ -438,6 +438,15 @@ if Convert.ToString(prop, Globalization.CultureInfo.InvariantCulture) <> "B" the """ ] + + // SOURCE=E_StructLayout_Extended.fs + [] + let ``E_StructLayout_Extended_fs`` compilation = + compilation + |> verifyCompile + |> shouldFail + |> withSingleDiagnostic (Error 3912, Line 7, Col 6, Line 7, Col 36, "LayoutKind value 1 (Extended) cannot be specified via StructLayoutAttribute. Use ExtendedLayoutAttribute instead.") + [] let ``StructLayoutAttribute doesn't have size=1 for multi-case struct DUs with no instance fields`` () = Fsx """ diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/E_StructLayout_Extended.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/E_StructLayout_Extended.fs new file mode 100644 index 00000000000..fc0d9bee1e1 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/E_StructLayout_Extended.fs @@ -0,0 +1,10 @@ +// LayoutKind.Extended (value 1) via StructLayoutAttribute should fail +namespace Test + +open System.Runtime.InteropServices + +[(1))>] +type InvalidExtendedViaStructLayout = + struct + val mutable X: int + end diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/ExtendedLayout.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/ExtendedLayout.fs new file mode 100644 index 00000000000..7cf9cb91a96 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/Basic/ExtendedLayout.fs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Conformance.BasicGrammarElements + +open Xunit +open FSharp.Test.Compiler + +#if NETCOREAPP +open System.IO +open System.Reflection +open System.Reflection.Metadata +open System.Reflection.PortableExecutable +#endif + +module CustomAttributes_ExtendedLayout = + +#if !NETCOREAPP + // Every test in this module requires System.Runtime.InteropServices.ExtendedLayoutAttribute, + // which only exists starting with .NET 11. On other target frameworks (e.g. net472) the module + // would otherwise be empty, which is not a valid module declaration, so keep one placeholder. + let private _requiresNetCore = () +#endif + +#if NETCOREAPP + // System.Runtime.InteropServices.ExtendedLayoutAttribute / ExtendedLayoutKind only exist starting with .NET 11, + // so these tests are gated to the .NET (Core) test flavor where that BCL is referenced. + + let private getOutputPath result = + match result with + | CompilationResult.Success success -> + match success.OutputPath with + | Some path -> path + | None -> failwith "Compilation succeeded but produced no output path." + | CompilationResult.Failure failure -> + failwithf "Compilation was expected to succeed, but failed with: %A" failure.Diagnostics + + let private findType (reader: MetadataReader) name = + reader.TypeDefinitions + |> Seq.map reader.GetTypeDefinition + |> Seq.find (fun td -> reader.GetString td.Name = name) + + let private customAttributeTypeName (reader: MetadataReader) (ca: CustomAttribute) = + match ca.Constructor.Kind with + | HandleKind.MemberReference -> + let mref = reader.GetMemberReference(MemberReferenceHandle.op_Explicit ca.Constructor) + match mref.Parent.Kind with + | HandleKind.TypeReference -> + let tref = reader.GetTypeReference(TypeReferenceHandle.op_Explicit mref.Parent) + reader.GetString tref.Namespace + "." + reader.GetString tref.Name + | _ -> "" + | _ -> "" + + [] + let ``ExtendedLayout on a struct emits the 0x18 layout flag and preserves the attribute`` () = + let output = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type CStructLike = + struct + val mutable X: int + val mutable Y: int + end +""" + |> asLibrary + |> compile + |> shouldSucceed + |> getOutputPath + + use stream = File.OpenRead output + use peReader = new PEReader(stream) + let reader = peReader.GetMetadataReader() + let typeDef = findType reader "CStructLike" + + // The extended layout is encoded as TypeAttributes value 0x18 (both the sequential and explicit layout bits set). + let layout = typeDef.Attributes &&& TypeAttributes.LayoutMask + Assert.Equal(0x18, int layout) + + // ExtendedLayoutAttribute is a real user-written attribute and must be preserved on the emitted type. + let preserved = + typeDef.GetCustomAttributes() + |> Seq.map reader.GetCustomAttribute + |> Seq.exists (fun ca -> customAttributeTypeName reader ca = "System.Runtime.InteropServices.ExtendedLayoutAttribute") + Assert.True(preserved, "ExtendedLayoutAttribute should be preserved on the emitted type.") + + [] + let ``ExtendedLayout on a struct record emits the 0x18 layout flag and preserves the attribute`` () = + let output = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type StructRecord = { X: int; Y: int } +""" + |> asLibrary + |> compile + |> shouldSucceed + |> getOutputPath + + use stream = File.OpenRead output + use peReader = new PEReader(stream) + let reader = peReader.GetMetadataReader() + let typeDef = findType reader "StructRecord" + + let layout = typeDef.Attributes &&& TypeAttributes.LayoutMask + Assert.Equal(0x18, int layout) + + let preserved = + typeDef.GetCustomAttributes() + |> Seq.map reader.GetCustomAttribute + |> Seq.exists (fun ca -> customAttributeTypeName reader ca = "System.Runtime.InteropServices.ExtendedLayoutAttribute") + Assert.True(preserved, "ExtendedLayoutAttribute should be preserved on the emitted struct record.") + + [] + let ``ExtendedLayout and StructLayout cannot be combined on a struct record`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type BothOnRecord = { X: int } +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3910 + + [] + let ``ExtendedLayout and StructLayout cannot be combined on the same type`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +[] +type BothAttrs = + struct + val mutable X: int + end +""" + |> asLibrary + |> compile + |> shouldFail + |> withSingleDiagnostic (Error 3910, Line 8, Col 6, Line 8, Col 15, "The attributes 'StructLayoutAttribute' and 'ExtendedLayoutAttribute' cannot be used together on the same type") + + [] + let ``ExtendedLayout on a class is rejected`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type NotAStruct() = + member _.X = 1 +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3911 + |> withErrorMessage "Only structs may be given the 'ExtendedLayoutAttribute'" + + [] + let ``ExtendedLayout on an interface is rejected`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type IExtended = + abstract M: unit -> int +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3911 + + [] + let ``ExtendedLayout on a reference record is rejected`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type R = { X: int } +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3911 + + [] + let ``ExtendedLayout on a union is rejected`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type U = A | B +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3913 + |> withErrorMessage "The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions" + + [] + let ``ExtendedLayout on a struct union is rejected`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type U = A of x: int | B of y: int +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3913 + |> withErrorMessage "The 'ExtendedLayoutAttribute' cannot be applied to discriminated unions" + + [] + let ``ExtendedLayout on an enum is rejected`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type E = + | A = 0 + | B = 1 +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3911 + + [] + let ``ExtendedLayout on a delegate is rejected`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type D = delegate of int -> int +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 3911 + + [] + let ``FieldOffset is not allowed on an ExtendedLayout struct`` () = + FSharp """ +namespace Test + +open System.Runtime.InteropServices + +[] +type WithOffset = + struct + [] val mutable X: int + end +""" + |> asLibrary + |> compile + |> shouldFail + |> withErrorCode 1211 +#endif diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 2d033e260dc..ea451cb418d 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -42,6 +42,7 @@ + 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 055808bf332..3c2087a3eda 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 @@ -1631,6 +1631,7 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Sequential: ILTypeDefLayoutInfo It FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Sequential: ILTypeDefLayoutInfo get_Item() FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Tags: Int32 Auto FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Tags: Int32 Explicit +FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Tags: Int32 Extended FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Tags: Int32 Sequential FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean Equals(ILTypeDefLayout) FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean Equals(ILTypeDefLayout, System.Collections.IEqualityComparer) @@ -1638,17 +1639,21 @@ FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean Equals(System.Object) FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean Equals(System.Object, System.Collections.IEqualityComparer) FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean IsAuto FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean IsExplicit +FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean IsExtended FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean IsSequential FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean get_IsAuto() FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean get_IsExplicit() +FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean get_IsExtended() FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Boolean get_IsSequential() FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Explicit FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Sequential FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout+Tags FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: ILTypeDefLayout Auto +FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: ILTypeDefLayout Extended FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: ILTypeDefLayout NewExplicit(ILTypeDefLayoutInfo) FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: ILTypeDefLayout NewSequential(ILTypeDefLayoutInfo) FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: ILTypeDefLayout get_Auto() +FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: ILTypeDefLayout get_Extended() FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Int32 CompareTo(ILTypeDefLayout) FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Int32 CompareTo(System.Object) FSharp.Compiler.AbstractIL.IL+ILTypeDefLayout: Int32 CompareTo(System.Object, System.Collections.IComparer)