diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-06 21:41:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 21:41:53 +0200 |
commit | 432c4c40a9d29c127a5957944ca8f805dfb836ce (patch) | |
tree | 7884834b2a5304ae46b0e8fbd0e58cadae70691f | |
parent | 5628ab9215d61fc2b7223b465626873368aaf66b (diff) | |
parent | 3666e9fcd048dcb4ef9efe6ef09bd51e9a229946 (diff) |
Merge pull request #65433 from neikeq/fix-mustbevariant-omittedtypearg
-rw-r--r-- | modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs index 7aaadb27be..98ca534c66 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs @@ -39,6 +39,11 @@ namespace Godot.SourceGenerators for (int i = 0; i < typeArgListSyntax.Arguments.Count; i++) { var typeSyntax = typeArgListSyntax.Arguments[i]; + + // Ignore omitted type arguments, e.g.: List<>, Dictionary<,>, etc + if (typeSyntax is OmittedTypeArgumentSyntax) + continue; + var typeSymbol = sm.GetSymbolInfo(typeSyntax).Symbol as ITypeSymbol; Debug.Assert(typeSymbol != null); |