Fix instanceof checks after introducing the TypeParameterDescriptor interface
This commit is contained in:
@@ -1093,7 +1093,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
|
||||
}
|
||||
}
|
||||
|
||||
if (descriptor instanceof TypeParameterDescriptorImpl) {
|
||||
if (descriptor instanceof TypeParameterDescriptor) {
|
||||
TypeParameterDescriptor typeParameterDescriptor = (TypeParameterDescriptor) descriptor;
|
||||
v.invokevirtual("jet/TypeInfo", "getClassObject", "()Ljava/lang/Object;");
|
||||
v.checkcast(asmType(typeParameterDescriptor.getClassObjectType()));
|
||||
@@ -2614,7 +2614,7 @@ If finally block is present, its last expression is the value of try expression.
|
||||
JetExpression left = expression.getLeft();
|
||||
JetType leftType = bindingContext.get(BindingContext.EXPRESSION_TYPE, left);
|
||||
DeclarationDescriptor descriptor = rightType.getConstructor().getDeclarationDescriptor();
|
||||
if (descriptor instanceof ClassDescriptor || descriptor instanceof TypeParameterDescriptorImpl) {
|
||||
if (descriptor instanceof ClassDescriptor || descriptor instanceof TypeParameterDescriptor) {
|
||||
StackValue value = genQualified(receiver, left);
|
||||
value.put(JetTypeMapper.boxType(value.type), v);
|
||||
assert leftType != null;
|
||||
|
||||
@@ -463,7 +463,7 @@ public class JetTypeMapper {
|
||||
return asmType;
|
||||
}
|
||||
|
||||
if (descriptor instanceof TypeParameterDescriptorImpl) {
|
||||
if (descriptor instanceof TypeParameterDescriptor) {
|
||||
|
||||
Type type = mapType(((TypeParameterDescriptor) descriptor).getUpperBoundsAsType(), kind);
|
||||
if (signatureVisitor != null) {
|
||||
@@ -722,7 +722,7 @@ public class JetTypeMapper {
|
||||
signatureVisitor.writeInterfaceBoundEnd();
|
||||
}
|
||||
}
|
||||
if (jetType.getConstructor().getDeclarationDescriptor() instanceof TypeParameterDescriptorImpl) {
|
||||
if (jetType.getConstructor().getDeclarationDescriptor() instanceof TypeParameterDescriptor) {
|
||||
signatureVisitor.writeInterfaceBound();
|
||||
mapType(jetType, signatureVisitor, MapTypeMode.TYPE_PARAMETER);
|
||||
signatureVisitor.writeInterfaceBoundEnd();
|
||||
@@ -988,7 +988,7 @@ public class JetTypeMapper {
|
||||
|
||||
public boolean isGenericsArray(JetType type) {
|
||||
DeclarationDescriptor declarationDescriptor = type.getConstructor().getDeclarationDescriptor();
|
||||
if(declarationDescriptor instanceof TypeParameterDescriptorImpl)
|
||||
if(declarationDescriptor instanceof TypeParameterDescriptor)
|
||||
return true;
|
||||
|
||||
if(standardLibrary.getArray().equals(declarationDescriptor))
|
||||
|
||||
Reference in New Issue
Block a user