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:
Raul Santos 2022-08-28 18:16:57 +02:00
parent f38ea254f3
commit 761e2b1a65
No known key found for this signature in database
GPG key ID: B532473AE3A803E4
4 changed files with 36 additions and 3 deletions

View file

@ -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)