Closed MonoLogueChi closed 3 months ago
This method may solve the problem, but I'm not familiar with SourceGenerator and I'm not sure if this is correct.
- codeWriter.Append($"var __{memberMeta.Name}__ = ");
+ codeWriter.Append($"{memberMeta.FullTypeName} __{memberMeta.Name}__ = ");
Enum also has the same problem and will be defined as int type
it would be better to generate it like so
var __TEMP__T= default(double);
var __TEMP__X= default(int);
this code is allready used to generate the temp vars in deserialize
Thanks for the report. Fixed in #102.
eg
will generate
The type of B should be float, not int