Skip to content

Commit

Permalink
Gen type properly for struct records
Browse files Browse the repository at this point in the history
  • Loading branch information
TIHan committed Sep 5, 2015
1 parent 1540116 commit 75b1f81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fsharp/IlxGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6299,7 +6299,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) =
| TTyconInterface -> ILTypeDefKind.Interface
| TTyconEnum -> ILTypeDefKind.Enum
| TTyconDelegate _ -> ILTypeDefKind.Delegate

| TRecdRepr {recd_kind=TyconRecdKind.TyconStruct} -> ILTypeDefKind.ValueType
| _ -> ILTypeDefKind.Class

let requiresExtraField =
Expand Down Expand Up @@ -6630,7 +6630,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) =
ILTypeDefLayout.Sequential { Size=Some 1; Pack=Some 0us }, ILDefaultPInvokeEncoding.Ansi

| _ ->
ILTypeDefLayout.Auto, ILDefaultPInvokeEncoding.Ansi
ILTypeDefLayout.Sequential { Size=None; Pack=None }, ILDefaultPInvokeEncoding.Ansi

This comment has been minimized.

Copy link
@TIHan

TIHan Sep 6, 2015

Author Owner

This was an accident. It should be Auto.


// if the type's layout is Explicit, ensure that each field has a valid offset
let validateExplicit fdef =
Expand Down

0 comments on commit 75b1f81

Please sign in to comment.