diff --git a/src/AST/Class.cs b/src/AST/Class.cs index 90fd1d50..479cac4b 100644 --- a/src/AST/Class.cs +++ b/src/AST/Class.cs @@ -138,7 +138,7 @@ namespace CppSharp.AST public bool IsValueType { - get { return Type == ClassType.ValueType; } + get { return Type == ClassType.ValueType || IsUnion; } } public bool IsRefType diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 4e0b88ad..fe08c1fe 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -310,12 +310,6 @@ namespace CppSharp.Generators.CSharp PushBlock(CSharpBlockKind.Class); GenerateDeclarationCommon(@class); - if (@class.IsUnion) - { - // TODO: How to do wrapping of unions? - throw new NotImplementedException(); - } - GenerateClassProlog(@class); NewLine();