mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 14:41:07 +00:00
C#: Ignore property indexers and report if exported
Ignore property indexers since they are unsupported and report a diagnostic if an user tries to export it.
This commit is contained in:
parent
f38ea254f3
commit
761e2b1a65
4 changed files with 36 additions and 3 deletions
|
|
@ -134,6 +134,12 @@ namespace Godot.SourceGenerators
|
|||
continue;
|
||||
}
|
||||
|
||||
if (property.IsIndexer)
|
||||
{
|
||||
Common.ReportExportedMemberIsIndexer(context, property);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 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 or without a setter. Godot properties must be both readable and writable.
|
||||
if (property.IsWriteOnly)
|
||||
|
|
@ -148,7 +154,6 @@ namespace Godot.SourceGenerators
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
var propertyType = property.Type;
|
||||
var marshalType = MarshalUtils.ConvertManagedTypeToMarshalType(propertyType, typeCache);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue