You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
C#: Fix generated nested class order
This commit is contained in:
@@ -88,16 +88,20 @@ namespace Godot.SourceGenerators
|
||||
if (isInnerClass)
|
||||
{
|
||||
var containingType = symbol.ContainingType;
|
||||
AppendPartialContainingTypeDeclarations(containingType);
|
||||
|
||||
while (containingType != null)
|
||||
void AppendPartialContainingTypeDeclarations(INamedTypeSymbol? containingType)
|
||||
{
|
||||
if (containingType == null)
|
||||
return;
|
||||
|
||||
AppendPartialContainingTypeDeclarations(containingType.ContainingType);
|
||||
|
||||
source.Append("partial ");
|
||||
source.Append(containingType.GetDeclarationKeyword());
|
||||
source.Append(" ");
|
||||
source.Append(containingType.NameWithTypeParameters());
|
||||
source.Append("\n{\n");
|
||||
|
||||
containingType = containingType.ContainingType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user