This commit is contained in:
Stepan Koltsov
2012-04-07 06:32:18 +04:00
parent b38e171812
commit 3d863a6b37
@@ -780,7 +780,12 @@ public class JetTypeMapper {
public CallableMethod mapToCallableMethod(ConstructorDescriptor descriptor, OwnerKind kind, boolean hasThis0) {
final JvmMethodSignature method = mapConstructorSignature(descriptor, hasThis0);
MapTypeMode mapTypeMode = ownerKindToMapTypeMode(kind);
String owner = mapType(descriptor.getContainingDeclaration().getDefaultType(), mapTypeMode).getInternalName();
JetType defaultType = descriptor.getContainingDeclaration().getDefaultType();
Type mapped = mapType(defaultType, mapTypeMode);
if (mapped.getSort() != Type.OBJECT) {
throw new IllegalStateException("type must have been mapped to object: " + defaultType + ", actual: " + mapped);
}
String owner = mapped.getInternalName();
return new CallableMethod(owner, owner, owner, method, INVOKESPECIAL);
}