[FIR2IR] Use FIR-specific methods to search for overridden functions

This commit is contained in:
Mikhail Glukhikh
2020-07-10 14:52:38 +03:00
parent 59cc9d4bc6
commit 1bbed6c4ed
19 changed files with 73 additions and 33 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: Test.java
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: B.java
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
abstract class GenericBase<T> {
abstract fun foo(x: T): T
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
// TARGET_BACKEND: JVM
-1
View File
@@ -1,5 +1,4 @@
// !LANGUAGE: +NewInference +SamConversionPerArgument
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: Fn.java
-1
View File
@@ -1,5 +1,4 @@
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: Fn.java
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// IGNORE_BACKEND: NATIVE
class MySet : HashSet<Int>() {
@@ -97,8 +97,8 @@ FILE fqName:<root> fileName:/implicitNotNullOnDelegatedImplementation.kt
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:K4 modality:FINAL visibility:public superTypes:[<root>.JUnrelatedFoo; <root>.IFoo]'
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.K4) returnType:kotlin.String?
overridden:
public open fun foo (): kotlin.String? declared in <root>.JUnrelatedFoo
public abstract fun foo (): kotlin.String declared in <root>.IFoo
public open fun foo (): kotlin.String? declared in <root>.JUnrelatedFoo
$this: VALUE_PARAMETER name:<this> type:<root>.K4
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String? declared in <root>.K4'
@@ -22,6 +22,8 @@ FILE fqName:<root> fileName:/expectClassInherited.kt
CONSTRUCTOR visibility:public <> (i:kotlin.Int) returnType:<root>.B [primary,expect]
VALUE_PARAMETER name:i index:0 type:kotlin.Int
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.Unit [expect]
overridden:
public abstract fun foo (): kotlin.Unit declared in <root>.A
$this: VALUE_PARAMETER name:<this> type:<root>.B
FUN name:bar visibility:public modality:OPEN <> ($this:<root>.B, s:kotlin.String) returnType:kotlin.Unit [expect]
$this: VALUE_PARAMETER name:<this> type:<root>.B
@@ -171,6 +171,8 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:collector type:<root>.FlowCollector<T of <root>.SafeCollector> visibility:private [final]' type=<root>.FlowCollector<T of <root>.SafeCollector> origin=null
receiver: GET_VAR '<this>: <root>.SafeCollector<T of <root>.SafeCollector> declared in <root>.SafeCollector.<get-collector>' type=<root>.SafeCollector<T of <root>.SafeCollector> origin=null
FUN name:emit visibility:public modality:FINAL <> ($this:<root>.SafeCollector<T of <root>.SafeCollector>, value:T of <root>.SafeCollector) returnType:kotlin.Unit [suspend]
overridden:
public abstract fun emit (value: T of <root>.FlowCollector): kotlin.Unit [suspend] declared in <root>.FlowCollector
$this: VALUE_PARAMETER name:<this> type:<root>.SafeCollector<T of <root>.SafeCollector>
VALUE_PARAMETER name:value index:0 type:T of <root>.SafeCollector
BLOCK_BODY
@@ -26,6 +26,8 @@ FILE fqName:<root> fileName:/implicitNotNullOnPlatformType.kt
RETURN type=kotlin.Nothing from='public final fun contains (element: kotlin.String): kotlin.Boolean declared in <root>.MySet'
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin' type=kotlin.Nothing origin=null
FUN name:containsAll visibility:public modality:FINAL <> ($this:<root>.MySet, elements:kotlin.collections.Collection<kotlin.String>) returnType:kotlin.Boolean
overridden:
public abstract fun containsAll (elements: kotlin.collections.Collection<E of kotlin.collections.Set>): kotlin.Boolean declared in kotlin.collections.Set
$this: VALUE_PARAMETER name:<this> type:<root>.MySet
VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<kotlin.String>
BLOCK_BODY