summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2023-07-06 12:43:23 +0200
committerRaul Santos <raulsntos@gmail.com>2023-07-06 16:10:14 +0200
commit671a5b4ea57359d6a2281992a5012f7b6b170e64 (patch)
tree03f4d5a2ef081c4cdf128139f770c8cb6fe74b25 /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
parent46424488edc341b65467ee7fd3ac423e4d49ad34 (diff)
downloadredot-engine-671a5b4ea57359d6a2281992a5012f7b6b170e64.tar.gz
C#: Compare symbol names without null flow state
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs')
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
index 38af1cbade..b2a3c046e5 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
@@ -37,7 +37,7 @@ namespace Godot.SourceGenerators
while (symbol != null)
{
if (symbol.ContainingAssembly?.Name == assemblyName &&
- symbol.ToString() == typeFullName)
+ symbol.FullQualifiedNameOmitGlobal() == typeFullName)
{
return true;
}
@@ -230,22 +230,22 @@ namespace Godot.SourceGenerators
.Replace(">", ")");
public static bool IsGodotExportAttribute(this INamedTypeSymbol symbol)
- => symbol.ToString() == GodotClasses.ExportAttr;
+ => symbol.FullQualifiedNameOmitGlobal() == GodotClasses.ExportAttr;
public static bool IsGodotSignalAttribute(this INamedTypeSymbol symbol)
- => symbol.ToString() == GodotClasses.SignalAttr;
+ => symbol.FullQualifiedNameOmitGlobal() == GodotClasses.SignalAttr;
public static bool IsGodotMustBeVariantAttribute(this INamedTypeSymbol symbol)
- => symbol.ToString() == GodotClasses.MustBeVariantAttr;
+ => symbol.FullQualifiedNameOmitGlobal() == GodotClasses.MustBeVariantAttr;
public static bool IsGodotClassNameAttribute(this INamedTypeSymbol symbol)
- => symbol.ToString() == GodotClasses.GodotClassNameAttr;
+ => symbol.FullQualifiedNameOmitGlobal() == GodotClasses.GodotClassNameAttr;
public static bool IsGodotGlobalClassAttribute(this INamedTypeSymbol symbol)
- => symbol.ToString() == GodotClasses.GlobalClassAttr;
+ => symbol.FullQualifiedNameOmitGlobal() == GodotClasses.GlobalClassAttr;
public static bool IsSystemFlagsAttribute(this INamedTypeSymbol symbol)
- => symbol.ToString() == GodotClasses.SystemFlagsAttr;
+ => symbol.FullQualifiedNameOmitGlobal() == GodotClasses.SystemFlagsAttr;
public static GodotMethodData? HasGodotCompatibleSignature(
this IMethodSymbol method,