1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Implement typed dictionaries

This commit is contained in:
Thaddeus Crews
2023-06-24 13:03:28 -05:00
parent 906a4e9db9
commit 9853a69144
86 changed files with 3071 additions and 193 deletions

View File

@@ -274,6 +274,14 @@ namespace Godot.SourceGenerators
return null;
}
public static ITypeSymbol[]? GetGenericElementTypes(ITypeSymbol typeSymbol)
{
if (typeSymbol is INamedTypeSymbol { IsGenericType: true } genericType)
return genericType.TypeArguments.ToArray();
return null;
}
private static StringBuilder Append(this StringBuilder source, string a, string b)
=> source.Append(a).Append(b);