Skip to content

Commit

Permalink
Fix methodDescriptor for generic expansion methods in generic expansions
Browse files Browse the repository at this point in the history
  • Loading branch information
kindlich committed Apr 19, 2024
1 parent 28a44a8 commit 4843289
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -584,16 +584,15 @@ public JavaSynthesizedClass getRange(RangeTypeID type) {
*/
public String getMethodDescriptor(FunctionHeader header, boolean isEnumConstructor, String expandedType) {
StringBuilder descBuilder = new StringBuilder("(");
if (expandedType != null)
descBuilder.append(expandedType);

for (int i = 0; i < header.getNumberOfTypeParameters(); i++)
descBuilder.append("Ljava/lang/Class;");

if (isEnumConstructor)
descBuilder.append("Ljava/lang/String;I");

//TODO: Put this earlier? We'd need to agree on one...
if (expandedType != null)
descBuilder.append(expandedType);

for (FunctionParameter parameter : header.parameters) {
descBuilder.append(getDescriptor(parameter.type));
}
Expand Down

0 comments on commit 4843289

Please sign in to comment.