diff --git a/src/Generator/AST/Utils.cs b/src/Generator/AST/Utils.cs index 1e887257..f7e2a90b 100644 --- a/src/Generator/AST/Utils.cs +++ b/src/Generator/AST/Utils.cs @@ -65,7 +65,21 @@ namespace CppSharp.AST if (field.Access == AccessSpecifier.Private) return true; - return !field.IsGenerated; + if (field.Class.IsValueType && field.IsDeclared) + return false; + + return !field.IsGenerated; + } + + public static bool CheckIgnoreProperty(Property prop) + { + if (prop.Access == AccessSpecifier.Private) + return true; + + if (prop.Field != null && prop.Field.Class.IsValueType && prop.IsDeclared) + return false; + + return !prop.IsGenerated; } }