FIR: Fix Java scope in case of accessor with getter signature from supertype

^KT-45584 Fixed
This commit is contained in:
Denis.Zharkov
2021-03-25 16:28:48 +03:00
parent 24f35ef281
commit 1f074326bf
21 changed files with 94 additions and 33 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FULL_JDK
// ISSUE: KT-45584
@@ -11,10 +10,12 @@ public interface PlaceholderExceptionSupport {
// FILE: PlaceholderException.java
public class PlaceholderException extends RuntimeException implements PlaceholderExceptionSupport {}
public class PlaceholderException extends RuntimeException implements PlaceholderExceptionSupport {
public PlaceholderException(String x) { super(x); }
}
// FILE: main.kt
class KotlinTestFailure : PlaceholderException() {} // <-- CONFLICTING_INHERITED_JVM_DECLARATIONS
class KotlinTestFailure : PlaceholderException("OK") {} // <-- CONFLICTING_INHERITED_JVM_DECLARATIONS
fun box(): String = "OK"
fun box(): String = KotlinTestFailure().message ?: "fail"
@@ -0,0 +1,21 @@
// TARGET_BACKEND: JVM
// FULL_JDK
// ISSUE: KT-45584
// FILE: PlaceholderExceptionSupport.java
public interface PlaceholderExceptionSupport {
String getMessage();
}
// FILE: PlaceholderException.java
public class PlaceholderException extends RuntimeException implements PlaceholderExceptionSupport {
public PlaceholderException(String x) { super(x); }
}
// FILE: main.kt
class KotlinTestFailure : PlaceholderException("OK") {} // <-- CONFLICTING_INHERITED_JVM_DECLARATIONS
fun box(): String = KotlinTestFailure().message ?: "fail"