Skip to content

Commit

Permalink
Supply PackingSize when creating TypeBuilder for struct with no field…
Browse files Browse the repository at this point in the history
…s (workaround bug in Mono SRE).
  • Loading branch information
someone-with-default-username committed Mar 18, 2015
1 parent c769479 commit 79f1911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ncc/generation/HierarchyEmitter.n
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,14 @@ namespace Nemerle.Compiler
type_builder =
if (!is_nested)
if(empty_struct)
TyManager._module_builder.DefineType (FullName + generic_mark_suffix, attrs, null, 1)
TyManager._module_builder.DefineType (FullName + generic_mark_suffix, attrs, null, SRE.PackingSize.Unspecified, 1)
else
TyManager._module_builder.DefineType (FullName + generic_mark_suffix, attrs)
else
{
def containing_builder = (DeclaringType :> TypeBuilder).GetTypeBuilder ();
if(empty_struct)
containing_builder.DefineNestedType (Name + generic_mark_suffix, attrs, null, 1)
containing_builder.DefineNestedType (Name + generic_mark_suffix, attrs, null, 1) // cannot specify both PackingSize and type size
else
containing_builder.DefineNestedType (Name + generic_mark_suffix, attrs)
};
Expand Down

0 comments on commit 79f1911

Please sign in to comment.