Merge pull request #65433 from neikeq/fix-mustbevariant-omittedtypearg

This commit is contained in:
Rémi Verschelde 2022-09-06 21:41:53 +02:00 committed by GitHub
commit 432c4c40a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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