summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
diff options
context:
space:
mode:
authorIgnacio Roldán Etcheverry <neikeq@users.noreply.github.com>2022-08-29 00:52:25 +0200
committerGitHub <noreply@github.com>2022-08-29 00:52:25 +0200
commitf70e106010e10451822ba8f526fdcc7b60fa2981 (patch)
tree956556e984b7960652225e618edc6c1592a2a898 /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
parentf69c1b79b76b4041c50c3f295c483d53030fa3b6 (diff)
parent761e2b1a65d40ffc8f8b6912e44c4fcfdb164b6f (diff)
downloadredot-engine-f70e106010e10451822ba8f526fdcc7b60fa2981.tar.gz
Merge pull request #64994 from raulsntos/dotnet/property-indexers
C#: Ignore property indexers and report if exported
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs')
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
index 85fadaa52e..c7745391d0 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPropertyDefValGenerator.cs
@@ -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);