[FIR2IR] Populate overridden symbols also with public symbol inheritors

This commit is contained in:
Mikhail Glukhikh
2020-05-28 12:36:02 +03:00
parent 85760770a8
commit 19f1a3de1a
24 changed files with 8 additions and 25 deletions
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class StrList : List<String?> {
override val size: Int
get() = throw UnsupportedOperationException()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// FILE: J.java
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var index = 0
interface IterableIterator : Iterator<Int> {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
// TODO: muted automatically, investigate should it be ran for JS or not
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
inline class AsInt(val value: Int) {
override fun toString(): String {
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
inline class Augmented(val x: Int) {
override fun toString(): String = (x + 1).toString()
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
inline class IC(val x: String) {
private fun privateFun() = x
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KT-5869
operator fun <T> Iterator<T>.iterator(): Iterator<T> = this
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS
private object EmptyList : List<Nothing> {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
private object EmptyMap : Map<Any, Nothing> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
private object EmptyStringMap : Map<String, Nothing> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
@@ -266,7 +266,7 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Test3<T of <root>.Test3>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Test3'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.List' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<T of <root>.Test3> visibility:private [final]' type=kotlin.collections.List<T of <root>.Test3> origin=null
receiver: GET_VAR '<this>: <root>.Test3<T of <root>.Test3> declared in <root>.Test3.hashCode' type=<root>.Test3<T of <root>.Test3> origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test3<T of <root>.Test3>) returnType:kotlin.String
@@ -355,7 +355,7 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Test4
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Test4'
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.List' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<kotlin.String> visibility:private [final]' type=kotlin.collections.List<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.hashCode' type=<root>.Test4 origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test4) returnType:kotlin.String
@@ -19,6 +19,8 @@ FILE fqName:<root> fileName:/inlineClassSyntheticMethods.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:t type:T of <root>.C visibility:private [final]' type=T of <root>.C origin=null
receiver: GET_VAR '<this>: <root>.C<T of <root>.C> declared in <root>.C.<get-t>' type=<root>.C<T of <root>.C> origin=null
FUN name:hashCode visibility:public modality:FINAL <> ($this:<root>.C<T of <root>.C>) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.C<T of <root>.C>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun hashCode (): kotlin.Int declared in <root>.C'
@@ -20,6 +20,8 @@ FILE fqName:<root> fileName:/superCalls.kt
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Base declared in <root>.Base.<get-bar>' type=<root>.Base origin=null
FUN name:hashCode visibility:public modality:OPEN <> ($this:<root>.Base) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Base
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Base'