fix: Fixes codegen migrations nullable valuetypes (#774)
This commit is contained in:
parent
bfb716f24f
commit
75fd8137b1
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ namespace SerializationGenerator
|
|||
var propertyType = serializableProperty.Type;
|
||||
var type = compilation.GetTypeByMetadataName(propertyType)?.IsValueType == true
|
||||
|| SymbolMetadata.IsPrimitiveFromTypeDisplayString(propertyType) && propertyType != "bool"
|
||||
? $"{propertyType}?" : propertyType;
|
||||
? $"{propertyType}{(serializableProperty.UsesSaveFlag == true ? "?" : "")}" : propertyType;
|
||||
|
||||
source.AppendLine($"{indent} internal readonly {type} {serializableProperty.Name};");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue