diff options
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs')
-rw-r--r-- | modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs | 2 |
1 files changed, 1 insertions, 1 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 e894e7a86c..a72a8c5880 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs @@ -135,7 +135,7 @@ namespace Godot.SourceGenerators { ITypeParameterSymbol? typeParamSymbol = parentSymbol switch { - IMethodSymbol methodSymbol when parentSyntax.Parent is AttributeSyntax && + IMethodSymbol methodSymbol when parentSyntax.Ancestors().Any(s => s is AttributeSyntax) && methodSymbol.ContainingType.TypeParameters.Length > 0 => methodSymbol.ContainingType.TypeParameters[typeArgumentIndex], |