|
@@ -128,16 +128,20 @@ using Godot.NativeInterop;
|
|
|
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;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -303,16 +307,20 @@ using Godot.NativeInterop;
|
|
|
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;
|
|
|
}
|
|
|
}
|
|
|
|