Fix issue with incomplete property overrides in C# sourcegen
This commit is contained in:
committed by
Raul Santos
parent
fa6cad230f
commit
4bb041de8b
+4
-2
@@ -123,10 +123,12 @@ namespace Godot.SourceGenerators
|
||||
|
||||
// TODO: We should still restore read-only properties after reloading assembly. Two possible ways: reflection or turn RestoreGodotObjectData into a constructor overload.
|
||||
// Ignore properties without a getter, without a setter or with an init-only setter. Godot properties must be both readable and writable.
|
||||
var godotClassProperties = propertySymbols.Where(property => !(property.IsReadOnly || property.IsWriteOnly || property.SetMethod!.IsInitOnly))
|
||||
var godotClassProperties = propertySymbols
|
||||
.Where(property => !(property.IsReadOnly || property.IsWriteOnly) && property.SetMethodOrBaseSetMethod() is { IsInitOnly: false })
|
||||
.WhereIsGodotCompatibleType(typeCache)
|
||||
.ToArray();
|
||||
var godotClassFields = fieldSymbols.Where(property => !property.IsReadOnly)
|
||||
var godotClassFields = fieldSymbols
|
||||
.Where(property => !property.IsReadOnly)
|
||||
.WhereIsGodotCompatibleType(typeCache)
|
||||
.ToArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user