summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-10-14 14:09:51 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-10-14 14:09:51 -0500
commitc409546cc3d6fdaa53bbad94594680d5144d82ac (patch)
treea081d559c5d6b8e54956fb7fb86529270049d3df /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MustBeVariantAnalyzer.cs
parente4dcef38e4b51bd5576ffeb540b04cd2d12a4f12 (diff)
parent9c99e519c61323f0972fb0aa4b3c59cb889ee970 (diff)
downloadredot-engine-c409546cc3d6fdaa53bbad94594680d5144d82ac.tar.gz
Merge pull request #98059 from zaevi/fix_csharp_unhandled_GD0303
[.NET] Fix unhandled GD0303 error for nested generic attribute types
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.cs2
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],