[FIR2IR] Re-use receiver application logic in callable ref conversion

This commit is contained in:
Mikhail Glukhikh
2020-03-30 11:21:33 +03:00
parent 1b1902f6ee
commit 697006d782
32 changed files with 14 additions and 40 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
interface T {
fun foo() = "OK"
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class Test {
companion object {
fun testStatic(ic: InnerClass): NotInnerClass = NotInnerClass(ic.value)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Outer(val value: String) {
inner class Inner {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A(val s: String) {
open inner class B(val s: String) {
fun testB() = s + this@A.s
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A(val s: String) {
val z = s
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Outer() {
inner class Inner() {
val outer: Outer get() = this@Outer
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
public class Test {
val content = 1
inner class A {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class Base {
fun doSomething() {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Foo(private val s: String) {
inner class Inner {
private val x = {
@@ -1,5 +1,4 @@
// !LANGUAGE: -NormalizeConstructorCalls
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
inner class B(val a: String = "a", val b: Int = 55, val c: String = "c")
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
inner class B(val a: Double = 1.0, val b: Int = 55, val c: String = "c")
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
inner class B(val a: Int = 1,
val b: Int = 2,
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Outer {
class Nested
inner class Inner
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Outer {
inner class Inner<T>(val t: T) {
fun box() = t
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Outer {
inner class Inner {
fun O() = this@Outer.O
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Outer {
inner class Inner {
fun box() = "OK"
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Test {
interface Foo { }
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
//KT-3927 Inner class cannot be instantiated with child instance of outer class
abstract class Base {
-2
View File
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun <T> tableView(init: Table<T>.() -> Unit) {
Table<T>().init()
}
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// MODULE: lib
// FILE: lib.kt
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// See also KT-6299
public open class Outer private constructor(val s: String) {
inner class Inner: Outer("O") {
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class D {
companion object {
protected val F: String = "OK"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class SuperClass(val arg: () -> String)
object obj {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
A.Nested().nestedA()
A.Nested().Inner().innerA()