summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-08-28 18:16:57 +0200
committerRaul Santos <raulsntos@gmail.com>2022-08-28 18:16:57 +0200
commit761e2b1a65d40ffc8f8b6912e44c4fcfdb164b6f (patch)
treef509d0c52b0c50ea7ab820d6c81d4ffa68cf222c /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs
parentf38ea254f334ffa02fb501b336b1a60374c7f945 (diff)
downloadredot-engine-761e2b1a65d40ffc8f8b6912e44c4fcfdb164b6f.tar.gz
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.
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs')
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs
index 5a84122c4c..39a99ff8ba 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptSerializationGenerator.cs
@@ -112,7 +112,8 @@ namespace Godot.SourceGenerators
var propertySymbols = members
.Where(s => !s.IsStatic && s.Kind == SymbolKind.Property)
- .Cast<IPropertySymbol>();
+ .Cast<IPropertySymbol>()
+ .Where(s => !s.IsIndexer);
var fieldSymbols = members
.Where(s => !s.IsStatic && s.Kind == SymbolKind.Field && !s.IsImplicitlyDeclared)