diff options
author | Raul Santos <raulsntos@gmail.com> | 2023-08-05 19:45:22 +0200 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2024-02-14 17:33:06 +0100 |
commit | 7b348708e8244aef4b523e5336cb99890be4b77f (patch) | |
tree | 2075c8b7bbe381fd6501d926d340ed0559e52890 /modules/mono/editor | |
parent | 907db8eebcecb97d527edcaff77a1c87a6c068f5 (diff) | |
download | redot-engine-7b348708e8244aef4b523e5336cb99890be4b77f.tar.gz |
C#: Use SymbolEqualityComparer
Use `SymbolEqualityComparer` to compare symbols and fix `RS1024` warning.
Diffstat (limited to 'modules/mono/editor')
-rw-r--r-- | modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ScriptPathAttributeGenerator.cs | 4 |
1 files changed, 2 insertions, 2 deletions
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 d6d8a93e03..625a6f9921 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<IGrouping<INamedTypeSymbol, (ClassDeclarationSyntax cds, INamedTypeSymbol symbol)>, INamedTypeSymbol, IEnumerable<ClassDeclarationSyntax>>(g => g.Key, g => g.Select(x => x.cds), SymbolEqualityComparer.Default); foreach (var godotClass in godotClasses) { |