C#: Compare symbol names without null flow state
This commit is contained in:
parent
46424488ed
commit
671a5b4ea5
3 changed files with 9 additions and 9 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue