[FIR] Don't generate delegated members for java methods with default implementation

^KT-62334 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-10-05 12:04:37 +03:00
committed by Space Team
parent 5857e6cc5d
commit 61ec143b74
16 changed files with 78 additions and 30 deletions
@@ -2,8 +2,6 @@
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION: KT-61370
// WITH_STDLIB
// FULL_JDK
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
abstract class AMap1<K1, V1>(private val m: Map<K1, V1>) : Map<K1, V1> by m
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: Base.java
public interface Base {
@@ -1,12 +1,3 @@
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
// FIR status: NSME: Test.remove(Ljava/lang/String;Ljava/lang/String;)Z
// FIR + JVM_IR:
// INVOKEVIRTUAL Test.remove (Ljava/lang/String;Ljava/lang/String;)Z
// => java.lang.NoSuchMethodError: Test.remove(Ljava/lang/String;Ljava/lang/String;)Z
// FE1.0 + JVM_IR:
// INVOKEVIRTUAL Test.remove (Ljava/lang/Object;Ljava/lang/Object;)Z
// => default method in java.util.Map (as expected)
// SKIP_JDK6
// TARGET_BACKEND: JVM
// FULL_JDK
-2
View File
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: Base.java
public interface Base {
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: Base.java
public interface Base {
-2
View File
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: Base.java
public interface Base extends KBase {
-2
View File
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: Base.java
public interface Base {
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM_IR
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: A.java
public interface A {
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM_IR
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: A.java
public interface A {
@@ -1,8 +1,6 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// WITH_STDLIB
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// FILE: javaDefaultMethod.kt
@@ -23,4 +21,4 @@ public interface J {
}
String getK();
}
}
-2
View File
@@ -1,7 +1,5 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// IGNORE_BACKEND_K2: ANY
// Ignore reason: KT-62334
// MODULE: lib
// FILE: A.java
@@ -126,6 +126,10 @@ FILE fqName:<root> fileName:/kt43342.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.collections.Map
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:getOrDefault visibility:public modality:OPEN <> ($this:<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>, key:K of <root>.ControlFlowInfo, defaultValue:V of <root>.ControlFlowInfo) returnType:V of <root>.ControlFlowInfo
$this: VALUE_PARAMETER name:<this> type:<root>.ControlFlowInfo<K of <root>.ControlFlowInfo, V of <root>.ControlFlowInfo>
VALUE_PARAMETER name:key index:0 type:K of <root>.ControlFlowInfo
VALUE_PARAMETER name:defaultValue index:1 type:V of <root>.ControlFlowInfo
CLASS CLASS name:StringFlowInfo modality:FINAL visibility:public superTypes:[<root>.ControlFlowInfo<kotlin.String, kotlin.String>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.StringFlowInfo
CONSTRUCTOR visibility:public <> (map:kotlin.collections.Map<kotlin.String, kotlin.String>) returnType:<root>.StringFlowInfo [primary]