K2 Scripting: add Fir script codegen tests
27 failing tests are muted
This commit is contained in:
committed by
Space Team
parent
83d0dbe436
commit
5824b9c59c
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
package script.long.name.inside.packag
|
||||
|
||||
interface I {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
val (abc, def) = A()
|
||||
|
||||
val rv = abc + def
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
val (_, b, _) = A()
|
||||
|
||||
class A {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: 2
|
||||
inline fun foo(l: (Int) -> Int ): Int {
|
||||
return l(1)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
val b = "K"
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
enum class Build { Debug, Release }
|
||||
|
||||
fun applySomething(build: Build) = when (build) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
data class Pair(val first: Int, val second: Int)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
val p = 0
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// param: 10
|
||||
|
||||
fun addX(y: Int) = java.lang.Integer.parseInt(args[0]) + y
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: 42
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: kotlin.Unit
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: kotlin.Unit
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: 42
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: abc
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: 42
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: 42
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: 42
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: abcabc
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
// expected: rv: abc!
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
class SimpleClass(val s: String) {
|
||||
fun foo() = s
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
var log = "begin"
|
||||
fun append(msg: String) {
|
||||
log = "$log;$msg"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
|
||||
class SimpleClass(val s: String) {
|
||||
fun foo() = s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user