Don't make traits and annotations inherit from KObject

#KT-5609 Fixed
This commit is contained in:
Alexander Udalov
2014-08-12 12:03:32 +04:00
parent 47d5f83d04
commit 226bfe65f0
10 changed files with 44 additions and 14 deletions
@@ -16,7 +16,6 @@
package org.jetbrains.jet.codegen;
import com.google.common.collect.Sets;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.ConfigurationKind;
@@ -233,11 +232,8 @@ public class AnnotationGenTest extends CodegenTestCase {
Class[] interfaces = aClass.getInterfaces();
assertEquals(0, aClass.getDeclaredMethods().length);
assertTrue(aClass.isAnnotation());
assertEquals(2, interfaces.length);
assertEquals(
Sets.newHashSet("java.lang.annotation.Annotation", "kotlin.jvm.internal.KObject"),
Sets.newHashSet(interfaces[0].getName(), interfaces[1].getName())
);
assertEquals(1, interfaces.length);
assertEquals("java.lang.annotation.Annotation", interfaces[0].getName());
}
public void testAnnotationClassWithStringProperty()
@@ -1843,6 +1843,11 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/regressions/kt533.kt");
}
@TestMetadata("kt5609.kt")
public void testKt5609() throws Exception {
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/regressions/kt5609.kt");
}
@TestMetadata("kt715.kt")
public void testKt715() throws Exception {
doTestWithStdlib("compiler/testData/codegen/boxWithStdlib/regressions/kt715.kt");