diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java b/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java index fcd14691bb1..febc4231f5e 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/ImplementationBodyCodegen.java @@ -446,8 +446,9 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen { } if (CodegenUtil.requireTypeInfoConstructorArg(descriptor.getDefaultType())) { - // TODO - i++; + AnnotationVisitor jetTypeParameterAnnotation = + mv.visitParameterAnnotation(i++, JvmStdlibNames.JET_TYPE_PARAMETER.getDescriptor(), true); + jetTypeParameterAnnotation.visitEnd(); } for (ValueParameterDescriptor valueParameter : constructorDescriptor.getValueParameters()) { diff --git a/compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParameters.kt b/compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParameters.kt new file mode 100644 index 00000000000..f3a596b7e8e --- /dev/null +++ b/compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTwoTypeParameters.kt @@ -0,0 +1,3 @@ +package test + +class ClassWithConstructorAndTypeParameter() diff --git a/compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTypeParameter.kt b/compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTypeParameter.kt new file mode 100644 index 00000000000..e50816cf1d2 --- /dev/null +++ b/compiler/testData/readKotlinBinaryClass/constructor/ConstructorWithTypeParameter.kt @@ -0,0 +1,3 @@ +package test + +class ClassWithConstructorAndTypeParameter

() diff --git a/stdlib/src/jet/runtime/typeinfo/JetTypeParameter.java b/stdlib/src/jet/runtime/typeinfo/JetTypeParameter.java index 3e559789bc5..d3d893ca1fe 100644 --- a/stdlib/src/jet/runtime/typeinfo/JetTypeParameter.java +++ b/stdlib/src/jet/runtime/typeinfo/JetTypeParameter.java @@ -18,5 +18,5 @@ public @interface JetTypeParameter { /** * @return name of parameter */ - String name(); + String name() default ""; }