i've been making a json comptime serializer and ran into issues when trying to get the type that Nullable is wrapping
here's example code that makes me crash:
using System;
class Program
{
public static void Main() {
}
[Serialize]
struct Tests {
Nullable<StringView> a;
}
struct SerializeAttribute : Attribute, IOnTypeInit {
[Comptime]
public void OnTypeInit(Type type, Self* prev)
{
for (let field in type.GetFields()) {
String wrappedTypeName = scope .();
field.FieldType.WrappedType.GetName(wrappedTypeName);
Compiler.EmitTypeBody(type, scope $"// {wrappedTypeName}");
}
}
}
}
