[FIR2IR] Implement mapping of FIR & IR built-in class members

This commit is contained in:
Mikhail Glukhikh
2020-03-23 12:37:23 +03:00
parent afacb4b4b2
commit 03143bc788
22 changed files with 60 additions and 30 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
interface B<T> {
val bar: T
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
var x = 0
do x++ while (x < 5)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun printlnMock(a: Any) {}
public fun testCoalesce() {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// DONT_RUN_GENERATED_CODE: JS
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// DONT_RUN_GENERATED_CODE: JS
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
fun box(): String {
val list = ArrayList<String>()
-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 Test {
val a : String = "1"
private val b : String get() = a
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR, JS, NATIVE
// WITH_REFLECT
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun t1() : Boolean {
val s1 : String? = "sff"
val s2 : String? = null
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun Long.id() = this
fun String.drop2() = if (length >= 2) subSequence(2, length) else null
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun Long.id() = this
fun String.drop2() = if (length >= 2) subSequence(2, length) else null
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun Long.id() = this
fun String.drop2() = if (length >= 2) subSequence(2, length) else null
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun Long.id() = this
fun String.drop2() = if (length >= 2) subSequence(2, length) else null
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun baz(s: String?): Int {
if (s == null) return 0
return when(s) {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box() : String {
val s = "abc"
val test1 = """$s"""
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
import kotlin.test.assertEquals
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
abstract class WaitFor {
init {
condition()
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
var subjectEvaluated = 0
fun String.foo() = length.also { ++subjectEvaluated }