diff --git a/src/AST/Enumeration.cs b/src/AST/Enumeration.cs index b76ccb51..88acd292 100644 --- a/src/AST/Enumeration.cs +++ b/src/AST/Enumeration.cs @@ -30,7 +30,11 @@ namespace CppSharp.AST public bool IsHexadecimal { get - { + { + if (Expression == null) + { + return false; + } return Expression.Contains("0x") || Expression.Contains("0X"); } } diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 83237d0c..db61bbeb 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -96,9 +96,9 @@ 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(); + //PrimitiveType primitive; + //if (!array.Type.Desugar().IsPrimitiveType(out primitive)) + // throw new NotSupportedException(); return new CSharpTypePrinterResult() { diff --git a/src/Generator/Types/CppTypePrinter.cs b/src/Generator/Types/CppTypePrinter.cs index 22345d8b..8dc17bb0 100644 --- a/src/Generator/Types/CppTypePrinter.cs +++ b/src/Generator/Types/CppTypePrinter.cs @@ -118,7 +118,7 @@ namespace CppSharp.Types public string VisitTemplateParameterSubstitutionType( TemplateParameterSubstitutionType param, TypeQualifiers quals) { - throw new System.NotImplementedException(); + return param.Replacement.Visit(this); } public string VisitInjectedClassNameType(InjectedClassNameType injected, TypeQualifiers quals)