You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
C#: Make MustBeVariantAnalyzer ignore OmittedTypeArgument
Fixes assertion error in the analyzer.
This commit is contained in:
@@ -39,6 +39,11 @@ namespace Godot.SourceGenerators
|
|||||||
for (int i = 0; i < typeArgListSyntax.Arguments.Count; i++)
|
for (int i = 0; i < typeArgListSyntax.Arguments.Count; i++)
|
||||||
{
|
{
|
||||||
var typeSyntax = typeArgListSyntax.Arguments[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;
|
var typeSymbol = sm.GetSymbolInfo(typeSyntax).Symbol as ITypeSymbol;
|
||||||
Debug.Assert(typeSymbol != null);
|
Debug.Assert(typeSymbol != null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user