diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index efe5bc7b..cd0b3f2f 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -97,10 +97,6 @@ namespace CppSharp.Generators.CSharp if (ContextKind == CSharpTypePrinterContextKind.Native && array.SizeType == ArrayType.ArraySize.Constant) { - //PrimitiveType primitive; - //if (!array.Type.Desugar().IsPrimitiveType(out primitive)) - // throw new NotSupportedException(); - return new CSharpTypePrinterResult() { Type = string.Format("fixed {0}", array.Type.Visit(this, quals)), diff --git a/src/Generator/Passes/CheckIgnoredDecls.cs b/src/Generator/Passes/CheckIgnoredDecls.cs index b693fe6b..c91da133 100644 --- a/src/Generator/Passes/CheckIgnoredDecls.cs +++ b/src/Generator/Passes/CheckIgnoredDecls.cs @@ -240,6 +240,14 @@ namespace CppSharp.Passes msg = "ignored"; return true; } + ArrayType arrayType = type as ArrayType; + PrimitiveType primitive; + if (arrayType != null && arrayType.SizeType == ArrayType.ArraySize.Constant && + !arrayType.Type.Desugar().IsPrimitiveType(out primitive)) + { + msg = "unsupported"; + return true; + } msg = null; return false;