Skip to content

Commit

Permalink
AOT: Handle printing names of generic parameter types (dotnet#80371)
Browse files Browse the repository at this point in the history
This case is hittable with tokens representing open generic types that
may have their full type names printed as a comment in JIT disasm after
e398ba2.
  • Loading branch information
jakobbotsch authored Jan 9, 2023
1 parent 304dfe0 commit 78f5a98
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public override void AppendName(StringBuilder sb, PointerType type)

public override void AppendName(StringBuilder sb, GenericParameterDesc type)
{
Debug.Fail("Unexpected generic parameter type in JitTypeNameFormatter");
string prefix = type.Kind == GenericParameterKind.Type ? "!" : "!!";
sb.Append(prefix);
sb.Append(type.Name);
}

public override void AppendName(StringBuilder sb, SignatureTypeVariable type)
Expand Down

0 comments on commit 78f5a98

Please sign in to comment.