diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs index d6d8a93e03c..625a6f99211 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs @@ -55,8 +55,8 @@ namespace Godot.SourceGenerators .Where(x => // Ignore classes whose name is not the same as the file name Path.GetFileNameWithoutExtension(x.cds.SyntaxTree.FilePath) == x.symbol.Name) - .GroupBy(x => x.symbol) - .ToDictionary(g => g.Key, g => g.Select(x => x.cds)); + .GroupBy<(ClassDeclarationSyntax cds, INamedTypeSymbol symbol), INamedTypeSymbol>(x => x.symbol, SymbolEqualityComparer.Default) + .ToDictionary, INamedTypeSymbol, IEnumerable>(g => g.Key, g => g.Select(x => x.cds), SymbolEqualityComparer.Default); foreach (var godotClass in godotClasses) {