[FIR2IR] Convert explicit receiver in advance

This commit is contained in:
Mikhail Glukhikh
2020-04-08 14:48:01 +03:00
parent b815cb7e4a
commit e1c78b31a6
23 changed files with 58 additions and 52 deletions
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun Array<String>.test1(): Array<String> {
val func = { i:Int -> this}
return func(1)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class C {
private fun String.ext() : String = ""
private fun f() {}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class C{
private var v : Int = 0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
interface Callback {
fun invoke(): String
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// KOTLIN_CONFIGURATION_FLAGS: CONSTRUCTOR_CALL_NORMALIZATION_MODE=enable
@@ -1,5 +1,4 @@
// !LANGUAGE: +NormalizeConstructorCalls
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
open class A(val s: String)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
//WITH_REFLECT
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
inline class R(private val r: Int) {
fun test() = object {
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
inline class R(private val r: Int) {
fun test() =
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
val d = 42.0
val c = 'C'
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
// KJS_WITH_FULL_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
return (object { val r = "OK" } ?: null)!!.r
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// !JVM_DEFAULT_MODE: all-compatibility
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// !JVM_DEFAULT_MODE: compatibility
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// !JVM_DEFAULT_MODE: all
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A {
var a: String = "Fail"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A(
val a: String = object {
override fun toString(): String = "OK"
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class A {
fun foo() = "OK"
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
package test
private val prop = "O"