@@ -214,16 +214,17 @@ let mkUnionCaseFieldId (fdef: IlxUnionCaseField) =
214214 // Use the lower case name of a field or constructor as the field/parameter name if it differs from the uppercase name
215215 fdef.LowerName, fdef.Type
216216
217- let inline getFieldsNullability ( g : TcGlobals ) ( ilf : ILFieldDef ) =
217+ let inline getFieldsNullability ( g : TcGlobals ) ( ilf : ILFieldDef ) =
218218 if g.checkNullness then
219219 ilf.CustomAttrs.AsArray()
220220 |> Array.tryFind ( IsILAttrib g.attrib_ NullableAttribute)
221- else None
221+ else
222+ None
222223
223224let mkUnionCaseFieldIdAndAttrs g fdef =
224- let nm , t = mkUnionCaseFieldId fdef
225+ let nm , t = mkUnionCaseFieldId fdef
225226 let attrs = getFieldsNullability g fdef.ILField
226- nm, t , attrs |> Option.toList
227+ nm, t , attrs |> Option.toList
227228
228229let refToFieldInTy ty ( nm , fldTy ) = mkILFieldSpecInTy ( ty, nm, fldTy)
229230
@@ -724,7 +725,7 @@ let mkMethodsAndPropertiesForFields
724725 let ilReturn =
725726 match getFieldsNullability g field.ILField with
726727 | None -> ilReturn
727- | Some a -> ilReturn.WithCustomAttrs( mkILCustomAttrsFromArray [| a |])
728+ | Some a -> ilReturn.WithCustomAttrs( mkILCustomAttrsFromArray [| a |])
728729
729730 yield
730731 mkILNonGenericInstanceMethod (
@@ -816,15 +817,17 @@ let convAlternativeDef
816817
817818 match getFieldsNullability g fd.ILField with
818819 | None -> plainParam
819- | Some a -> { plainParam with CustomAttrsStored = storeILCustomAttrs ( mkILCustomAttrsFromArray [| a|]) } )
820+ | Some a ->
821+ { plainParam with
822+ CustomAttrsStored = storeILCustomAttrs ( mkILCustomAttrsFromArray [| a |])
823+ })
820824
821825 |> Array.toList,
822826 mkILReturn baseTy,
823827 mkMethodBody ( true , locals, fields.Length + locals.Length, nonBranchingInstrsToCode ilInstrs, attr, imports)
824828 )
825829 |> addAltAttribs
826830 |> addMethodGeneratedAttrs
827-
828831
829832 mdef
830833
@@ -987,7 +990,6 @@ let convAlternativeDef
987990 )
988991 |> addAltAttribs
989992 |> addMethodGeneratedAttrs
990-
991993
992994 let nullaryProp =
993995
@@ -1162,6 +1164,7 @@ let convAlternativeDef
11621164 |> Array.map ( fun field ->
11631165 let fldName , fldTy , attrs = mkUnionCaseFieldIdAndAttrs g field
11641166 let fdef = mkILInstanceField ( fldName, fldTy, None, ILMemberAccess.Assembly)
1167+
11651168 let fdef =
11661169 match attrs with
11671170 | [] -> fdef
@@ -1204,9 +1207,10 @@ let convAlternativeDef
12041207 cud.UnionCasesAccessibility)
12051208
12061209 let basicCtorFields =
1207- basicFields |> List.map ( fun fdef ->
1210+ basicFields
1211+ |> List.map ( fun fdef ->
12081212 let existingAttrs = fdef.CustomAttrs.AsArray()
1209- let nullableAttr = getFieldsNullability g fdef |> Option.toList
1213+ let nullableAttr = getFieldsNullability g fdef |> Option.toList
12101214 fdef.Name, fdef.FieldType, nullableAttr)
12111215
12121216 let basicCtorMeth =
@@ -1304,7 +1308,7 @@ let mkClassUnionDef
13041308 | SingleCase
13051309 | RuntimeTypes
13061310 | TailOrNull -> []
1307- | IntegerTag -> [ let n , t = mkTagFieldId g.ilg cuspec in n, t , [] ]
1311+ | IntegerTag -> [ let n , t = mkTagFieldId g.ilg cuspec in n, t , [] ]
13081312
13091313 let isStruct = td.IsStruct
13101314
@@ -1344,7 +1348,9 @@ let mkClassUnionDef
13441348 if isStruct && not ( cidx = minNullaryIdx) then
13451349 []
13461350 else
1347- let fields = alt.FieldDefs |> Array.map ( mkUnionCaseFieldIdAndAttrs g) |> Array.toList
1351+ let fields =
1352+ alt.FieldDefs |> Array.map ( mkUnionCaseFieldIdAndAttrs g) |> Array.toList
1353+
13481354 [
13491355 ( mkILSimpleStorageCtor (
13501356 baseInit,
@@ -1414,7 +1420,10 @@ let mkClassUnionDef
14141420 fieldDefs
14151421 |> Array.filter ( fun f -> fieldsEmitted.Add( struct ( f.LowerName, f.Type)))
14161422
1417- let fields = fieldsToBeAddedIntoType |> Array.map ( mkUnionCaseFieldIdAndAttrs g) |> Array.toList
1423+ let fields =
1424+ fieldsToBeAddedIntoType
1425+ |> Array.map ( mkUnionCaseFieldIdAndAttrs g)
1426+ |> Array.toList
14181427
14191428 let props , meths =
14201429 mkMethodsAndPropertiesForFields
@@ -1437,6 +1446,7 @@ let mkClassUnionDef
14371446 for fldName, fldTy, attrs in ( selfFields @ tagFieldsInObject) do
14381447 let fdef =
14391448 let fdef = mkILInstanceField ( fldName, fldTy, None, ILMemberAccess.Assembly)
1449+
14401450 match attrs with
14411451 | [] -> fdef
14421452 | attrs -> fdef.With( customAttrs = mkILCustomAttrs attrs)
0 commit comments