[FIR2IR] Generate property extension receiver references properly

This commit is contained in:
Mikhail Glukhikh
2020-04-02 15:31:25 +03:00
parent 4234438d8d
commit f374c36cd2
44 changed files with 64 additions and 178 deletions
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
val <T> Array<T>.length : Int get() = this.size
fun box() = if(arrayOfNulls<Int>(10).length == 10) "OK" else "fail"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: NATIVE
class A(var v: Int) {
fun f(x: Int) = x * v
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
val Array<String>.firstElement: String get() = get(0)
fun box(): String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: NATIVE
//For KT-6020
import kotlin.reflect.KProperty1
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var state = ""
var topLevel: Int
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var recivier : Any? = "fail"
var value2 : Any? = "fail2"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
val String.id: String
get() = this
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var storage = 0
var Int.foo: Int
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
import kotlin.reflect.KProperty
class Delegate {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
open class C
object O : C()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A(val o: String)
interface I {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
import kotlin.reflect.KProperty
var log = ""
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
fun box() : String {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
val <T> T.valProp: T
get() = this
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var <T> T.varProp: T
get() = this
set(value: T) {}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
import kotlin.reflect.KProperty
public open class TestDelegate<T: Any>(private val initializer: () -> T) {
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
@Target(AnnotationTarget.PROPERTY)
annotation class Anno
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
inline class UInt(private val value: Int) {
operator fun plus(other: UInt): UInt = UInt(value + other.asValue())
@@ -1,5 +1,4 @@
// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
inline class Z(val x: Int)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
inline class InlineLong(val value: Long)
inline val Number.toInlineLong get() = InlineLong(this.toLong())
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: NATIVE
//For KT-6020
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: A.kt
-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
class A {
var result: Int = 0;
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
annotation class Anno
@Anno val Int.foo: Int
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: JS_IR
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Test {
val Long.foo: Long
get() = this + 1
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
package whats.the.difference