Bug in rendering Guid? property types
Closed this issue · 3 comments
Illeris commented
Think PropertyGenerator::Create contains a bug for a property of Guid? type. It is rendered like this in code file: Nullable'1
For primitive datatypes it goes perfectly well...
Illeris commented
Adding this:
if (type == typeof(Guid))
{
typeSyntax = IdentifierName("Guid");
}
to TypeGenerator::CheckPredefinedTypes, after all the other checks, appears to solve the issue
MilleBo commented
Nice find, can you create a PR with the fix + a test in TypeGeneratorTests.cs
? If not I can do it later today.
MilleBo commented
I found some time to check on it and it seems like we don't support structs that well (or well nullable structs). So I added support for that but made some specific tests for GUID as it's a pretty normal struct to use.