Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
type name generator ignored names of nested classes
  • Loading branch information
lostmsu committed May 7, 2022
commit 2910800eb6f04fbe1fc70645b8c1820e6e192369
17 changes: 17 additions & 0 deletions src/runtime/TypeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,23 @@ static void GetPythonTypeName(Type clrType, System.Text.StringBuilder target)
}

target.Append(']');

int nestedStart = fullName.IndexOf('+');
while (nestedStart >= 0)
{
target.Append('.');
int nextNested = fullName.IndexOf('+', nestedStart + 1);
if (nextNested < 0)
{
target.Append(fullName.Substring(nestedStart + 1));
}
else
{
target.Append(fullName.Substring(nestedStart + 1, length: nextNested - nestedStart - 1));
}
nestedStart = nextNested;
}

return;
}
}
Expand Down