diff --git a/idea/src/org/jetbrains/jet/codegen/ClassCodegen.java b/idea/src/org/jetbrains/jet/codegen/ClassCodegen.java index 7a5e725d04d..2b752d9a0f0 100644 --- a/idea/src/org/jetbrains/jet/codegen/ClassCodegen.java +++ b/idea/src/org/jetbrains/jet/codegen/ClassCodegen.java @@ -207,8 +207,9 @@ public class ClassCodegen { JetType superType = bindingContext.resolveTypeReference(specifier.getTypeReference()); ClassDescriptor superClassDescriptor = (ClassDescriptor) superType.getConstructor().getDeclarationDescriptor(); String delegateField = "$delegate_" + n; - v.visitField(Opcodes.ACC_PRIVATE, delegateField, JetTypeMapper.jvmNameForInterface(superClassDescriptor), /*TODO*/null, null); - iv.putfield(classname, delegateField, JetTypeMapper.jetInterfaceType(superClassDescriptor).getDescriptor()); + String fieldDesc = JetTypeMapper.jetInterfaceType(superClassDescriptor).getDescriptor(); + v.visitField(Opcodes.ACC_PRIVATE, delegateField, fieldDesc, /*TODO*/null, null); + iv.putfield(classname, delegateField, fieldDesc); } n++; diff --git a/idea/testData/codegen/inheritance.jet b/idea/testData/codegen/inheritance.jet index 984db42234e..bbc31fef086 100644 --- a/idea/testData/codegen/inheritance.jet +++ b/idea/testData/codegen/inheritance.jet @@ -5,10 +5,10 @@ class Point(x : Int, y : Int) : X(x), Y(y) {} class Abstract {} -class P1(x : Int, y : Y) : Abstract, X(x), Y by y {} -class P2(x : Int, y : Y) : X(x), Abstract, Y by y {} -class P3(x : Int, y : Y) : X(x), Y by y, Abstract {} -class P4(x : Int, y : Y) : Y by y, Abstract, X(x) {} +class P1(x : Int, yy : Y) : Abstract, X(x), Y by yy {} +class P2(x : Int, yy : Y) : X(x), Abstract, Y by yy {} +class P3(x : Int, yy : Y) : X(x), Y by yy, Abstract {} +class P4(x : Int, yy : Y) : Y by yy, Abstract, X(x) {} fun box() : String { if (new X(239).x != 239) return "FAIL #1"