IDELightClassContexts#isDummyResolveApplicable: add missing check

Missing check caused exact resolve being applied to every class that had 'equals' overridden
This commit is contained in:
Pavel V. Talanov
2017-04-14 16:56:33 +03:00
parent 10aa9c5910
commit 3401529be1
6 changed files with 59 additions and 4 deletions
@@ -0,0 +1,16 @@
public final class A {
private final int y;
public boolean equals(@org.jetbrains.annotations.Nullable java.lang.Object other) { /* compiled code */ }
public int hashCode() { /* compiled code */ }
@org.jetbrains.annotations.NotNull
public java.lang.String toString() { /* compiled code */ }
public final int component1() { /* compiled code */ }
public final int getY() { /* compiled code */ }
public A(int y) { /* compiled code */ }
}
@@ -0,0 +1,18 @@
// p.A
package p
class A(val y: Int) {
override fun equals(other: Any?): Boolean {
return super.equals(other)
}
override fun hashCode(): Int {
return super.hashCode()
}
override fun toString(): String {
return super.toString()
}
fun component1() = y
}
@@ -114,6 +114,12 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
doTest(fileName);
}
@TestMetadata("NonDataClassWithComponentFunctions.kt")
public void testNonDataClassWithComponentFunctions() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt");
doTest(fileName);
}
@TestMetadata("PublishedApi.kt")
public void testPublishedApi() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/PublishedApi.kt");