toString() for FunctionN classes

It's implemented as if the types were reified: getting the real type parameters
of the corresponding FunctionN class
This commit is contained in:
Alexander Udalov
2013-03-25 21:57:41 +04:00
parent 0ec1f20140
commit 76fa9642f0
50 changed files with 228 additions and 3 deletions
@@ -308,14 +308,15 @@ public class ClosureCodegen extends GenerationStateAware {
signatureWriter.visitArrayType();
rawRetType = rawRetType.getElementType();
}
if (rawRetType.getSort() == Type.OBJECT) {
signatureWriter.visitClassType(rawRetType.getInternalName());
signatureWriter.visitEnd();
}
else {
// rawRetType is primitive
assert isPrimitive(rawRetType);
signatureWriter.visitBaseType(rawRetType.getDescriptor().charAt(0));
}
signatureWriter.visitEnd();
}
private static FunctionDescriptor getInvokeFunction(FunctionDescriptor funDescriptor) {