diff --git a/src/Generator/Types/TypeIgnoreChecker.cs b/src/Generator/Types/TypeIgnoreChecker.cs index 2062492e..a08cad0a 100644 --- a/src/Generator/Types/TypeIgnoreChecker.cs +++ b/src/Generator/Types/TypeIgnoreChecker.cs @@ -138,14 +138,22 @@ namespace CppSharp return false; } + var arrayElemType = array.Type.Desugar(); + + if (array.SizeType == ArrayType.ArraySize.Incomplete && + array.QualifiedType.Qualifiers.IsConst && + !arrayElemType.IsPrimitiveType()) + { + Ignore(); + return false; + } + if (!array.QualifiedType.Visit(this)) return false; if (array.SizeType != ArrayType.ArraySize.Constant) return true; - var arrayElemType = array.Type.Desugar(); - Class @class; if (arrayElemType.TryGetClass(out @class) && @class.IsRefType) return true; diff --git a/tests/CSharp/CSharp.h b/tests/CSharp/CSharp.h index 6a46b617..69c43b9d 100644 --- a/tests/CSharp/CSharp.h +++ b/tests/CSharp/CSharp.h @@ -1203,4 +1203,6 @@ public: int TestIndexedProperties::operator[](const int& key) { return key; -} \ No newline at end of file +} + +extern const ComplexArrayElement ArrayOfVariableSize[]; \ No newline at end of file