[JS IR] Add tests for JS IR IC + PL
^KT-57347 related
This commit is contained in:
committed by
Space Team
parent
97620030c6
commit
82a1242f22
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 0
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo(x: Int) = x + 1
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 2
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
// this is known issue, that return type doesn not affect IdSignature
|
||||
// https://youtrack.jetbrains.com/issue/KT-51707
|
||||
fun foo() = "4"
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo(x: Int = 1) = "${x + 5}"
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1.0.kt -> l1.kt
|
||||
added file: l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1.1.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1.2.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 3:
|
||||
STEP 4:
|
||||
modifications:
|
||||
U : l1.4.bug.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 5:
|
||||
STEP 6:
|
||||
modifications:
|
||||
U : l1.6.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 7:
|
||||
updated exports: l1.kt
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
if (stepId == 4) {
|
||||
// this is known issue, that return type doesn not affect IdSignature
|
||||
// https://youtrack.jetbrains.com/issue/KT-51707
|
||||
if (x != 41) return "Fail; got $x"
|
||||
} else {
|
||||
if (stepId != x) return "Fail; got $x"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : test.0.kt -> test.kt
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
STEP 3:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : test.3.kt -> test.kt
|
||||
modified ir: test.kt
|
||||
STEP 4:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
STEP 5:
|
||||
dependencies: lib1
|
||||
modified ir: test.kt
|
||||
STEP 6:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
STEP 7:
|
||||
dependencies: lib1
|
||||
modified ir: test.kt
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return foo()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return foo().toInt() + 1
|
||||
} catch (e: Error) {
|
||||
return 6
|
||||
}
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0..2:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 3:
|
||||
libs: lib1, main
|
||||
dirty js: main
|
||||
STEP 4:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 5:
|
||||
libs: lib1, main
|
||||
dirty js: main
|
||||
STEP 6:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
STEP 7:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
interface Foo {
|
||||
fun getSomething() = 0
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
open class Foo {
|
||||
fun getSomething() = 77
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
interface Foo {
|
||||
fun getSomething() = 2
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
open class Foo {
|
||||
open fun getSomething() = 7
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1.0.kt -> l1.kt
|
||||
added file: l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1.1.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1.2.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 3..4:
|
||||
STEP 5:
|
||||
modifications:
|
||||
U : l1.5.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
STEP 6:
|
||||
updated exports: l1.kt
|
||||
STEP 7:
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
open class Bar : Foo {
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
open class Bar : Foo {
|
||||
override fun getSomething() = 3
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
interface Bar : Foo {
|
||||
override fun getSomething() = 4
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
open class Bar : Foo() {
|
||||
override fun getSomething() = 6
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
open class Bar : Foo() {
|
||||
}
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : l2.0.kt -> l2.kt
|
||||
added file: l2.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: l2.kt
|
||||
STEP 3:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : l2.3.kt -> l2.kt
|
||||
modified ir: l2.kt
|
||||
STEP 4:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : l2.4.kt -> l2.kt
|
||||
modified ir: l2.kt
|
||||
STEP 5:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated exports: l2.kt
|
||||
updated imports: l2.kt
|
||||
STEP 6:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : l2.6.kt -> l2.kt
|
||||
modified ir: l2.kt
|
||||
STEP 7:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
U : l2.7.kt -> l2.kt
|
||||
modified ir: l2.kt
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
class Klass: Bar() {
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
class Klass: Bar {
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
class Klass: Bar() {
|
||||
override fun getSomething() = super.getSomething()
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
if (stepId != x) return "Fail; got $x"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
STEP 0:
|
||||
dependencies: lib1, lib2
|
||||
modifications:
|
||||
U : klass.0.kt -> klass.kt
|
||||
U : test.0.kt -> test.kt
|
||||
added file: m.kt, test.kt, klass.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1, lib2
|
||||
rebuild klib: false
|
||||
updated imports: test.kt, klass.kt
|
||||
STEP 3:
|
||||
dependencies: lib1, lib2
|
||||
rebuild klib: false
|
||||
STEP 4:
|
||||
dependencies: lib1, lib2
|
||||
modifications:
|
||||
U : klass.4.kt -> klass.kt
|
||||
U : test.4.kt -> test.kt
|
||||
modified ir: klass.kt, test.kt
|
||||
STEP 5:
|
||||
dependencies: lib1, lib2
|
||||
rebuild klib: false
|
||||
updated exports: klass.kt
|
||||
updated imports: test.kt, klass.kt
|
||||
STEP 6:
|
||||
dependencies: lib1, lib2
|
||||
modifications:
|
||||
U : klass.6.kt -> klass.kt
|
||||
modified ir: klass.kt
|
||||
updated exports: klass.kt
|
||||
updated imports: test.kt
|
||||
STEP 7:
|
||||
dependencies: lib1, lib2
|
||||
rebuild klib: false
|
||||
updated imports: klass.kt
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return Klass().getSomething()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return Klass().getSomething()
|
||||
} catch (e: Error) {
|
||||
return 5
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
MODULES: lib1, lib2, main
|
||||
|
||||
STEP 0..2:
|
||||
libs: lib1, lib2, main
|
||||
dirty js: lib1, lib2, main
|
||||
STEP 3:
|
||||
libs: lib1, lib2, main
|
||||
dirty js: lib1, lib2
|
||||
STEP 4:
|
||||
libs: lib1, lib2, main
|
||||
dirty js: lib2, main
|
||||
STEP 5..6:
|
||||
libs: lib1, lib2, main
|
||||
dirty js: lib1, lib2, main
|
||||
STEP 7:
|
||||
libs: lib1, lib2, main
|
||||
dirty js: lib2, main
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 0
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun bar() = 2
|
||||
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 2
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1.0.kt -> l1.kt
|
||||
added file: l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1.1.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1.2.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
if (stepId != x) return "Fail; got $x"
|
||||
return "OK"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return foo().toInt()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0..2:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
fooX = 0
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun bar() {
|
||||
fooX = 1
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
fooX = 2
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun baz() = 10
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun baz() = 11
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
var fooX = -100
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1a.0.kt -> l1a.kt
|
||||
U : l1b.0.kt -> l1b.kt
|
||||
added file: l1a.kt, l1b.kt, l1c.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1a.1.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
updated exports: l1a.kt, l1c.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1a.2.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
updated exports: l1a.kt, l1c.kt
|
||||
STEP 3:
|
||||
modifications:
|
||||
U : l1b.3.kt -> l1b.kt
|
||||
modified ir: l1b.kt
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
if (stepId != x) return "Fail; got $x"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..3:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
internal fun doTest() : Int {
|
||||
foo()
|
||||
val y = baz()
|
||||
return y + fooX - 10
|
||||
}
|
||||
|
||||
fun test(): Int {
|
||||
try {
|
||||
return doTest()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0..3:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
js/js.translator/testData/incremental/invalidationWithPL/removeFunctionFromChainCall/lib1/klass.0.kt
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
class Klass {
|
||||
inline fun foo() = 0
|
||||
}
|
||||
js/js.translator/testData/incremental/invalidationWithPL/removeFunctionFromChainCall/lib1/klass.2.kt
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
class Klass {
|
||||
inline fun foo() = 3
|
||||
}
|
||||
js/js.translator/testData/incremental/invalidationWithPL/removeFunctionFromChainCall/lib1/klass.4.kt
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
class Klass {
|
||||
inline fun foo() = 4
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun makeKlass() = Klass()
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun makeKlassOther() = Klass()
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun makeKlass() = Klass()
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : klass.0.kt -> klass.kt
|
||||
U : l1a.0.kt -> l1a.kt
|
||||
added file: l1a.kt, klass.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1a.1.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
updated exports: l1a.kt, klass.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : klass.2.kt -> klass.kt
|
||||
modified ir: klass.kt
|
||||
STEP 3:
|
||||
modifications:
|
||||
U : l1a.3.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
updated exports: l1a.kt, klass.kt
|
||||
STEP 4:
|
||||
modifications:
|
||||
U : klass.4.kt -> klass.kt
|
||||
modified ir: klass.kt
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
val expected = when (stepId) {
|
||||
0, 1, 3, 4 -> stepId
|
||||
2 -> 1
|
||||
else -> return "Unknown"
|
||||
}
|
||||
if (expected != x) return "Fail; $expected != $x"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..4:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return makeKlass().foo()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0..4:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun foo(): Int? = null
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun foo77(): Int? = 77
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun foo(): Int? = 3
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun foo(): Int? = null
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun bar() = 0
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun bar() = 4
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1a.0.kt -> l1a.kt
|
||||
U : l1b.0.kt -> l1b.kt
|
||||
added file: l1a.kt, l1b.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1a.1.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
updated exports: l1a.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1b.2.kt -> l1b.kt
|
||||
modified ir: l1b.kt
|
||||
STEP 3:
|
||||
modifications:
|
||||
U : l1a.3.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
updated exports: l1a.kt
|
||||
STEP 4:
|
||||
modifications:
|
||||
U : l1a.4.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
val expected = when (stepId) {
|
||||
0, 1, 3, 4 -> stepId
|
||||
2 -> 1
|
||||
else -> return "Unknown"
|
||||
}
|
||||
if (expected != x) return "Fail; $expected != $x"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..4:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return foo() ?: bar()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0..4:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 0
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun bar() = 77
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
fun foo() = 2
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1.0.kt -> l1.kt
|
||||
added file: l1.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1.1.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1.2.kt -> l1.kt
|
||||
modified ir: l1.kt
|
||||
updated exports: l1.kt
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun inlineFun() = foo()
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
added file: l2.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: l2.kt
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
if (x != stepId) return "Fail; got $x"
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
STEP 0:
|
||||
dependencies: lib1, lib2
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..2:
|
||||
dependencies: lib1, lib2
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return inlineFun()
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
MODULES: lib1, lib2, main
|
||||
|
||||
STEP 0..2:
|
||||
libs: lib1, lib2, main
|
||||
dirty js: lib1, lib2, main
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun foo() = -1
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun foo() = 1
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun inlineFoo(f: () -> Int) = f() + 1
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun inlineBar(f: () -> Int) = f() + 1
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun inlineFoo(f: () -> Int) = f() + 2
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
inline fun inlineFoo(f: () -> Int) = f() + 3
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
STEP 0:
|
||||
modifications:
|
||||
U : l1a.0.kt -> l1a.kt
|
||||
U : l1b.0.kt -> l1b.kt
|
||||
added file: l1a.kt, l1b.kt
|
||||
STEP 1:
|
||||
modifications:
|
||||
U : l1b.1.kt -> l1b.kt
|
||||
modified ir: l1b.kt
|
||||
updated exports: l1b.kt
|
||||
STEP 2:
|
||||
modifications:
|
||||
U : l1a.2.kt -> l1a.kt
|
||||
modified ir: l1a.kt
|
||||
STEP 3:
|
||||
modifications:
|
||||
U : l1b.3.kt -> l1b.kt
|
||||
modified ir: l1b.kt
|
||||
updated exports: l1b.kt
|
||||
STEP 4:
|
||||
modifications:
|
||||
U : l1b.4.kt -> l1b.kt
|
||||
modified ir: l1b.kt
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fun box(stepId: Int): String {
|
||||
val x = test()
|
||||
val expected = when (stepId) {
|
||||
0, 1, 3, 4 -> stepId
|
||||
2 -> 1
|
||||
else -> return "Unknown"
|
||||
}
|
||||
if (expected != x) return "Fail; $expected != $x"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
STEP 0:
|
||||
dependencies: lib1
|
||||
modifications:
|
||||
added file: m.kt, test.kt
|
||||
STEP 1..4:
|
||||
dependencies: lib1
|
||||
rebuild klib: false
|
||||
updated imports: test.kt
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(): Int {
|
||||
try {
|
||||
return inlineFoo { foo() }
|
||||
} catch (e: Error) {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
MODULES: lib1, main
|
||||
|
||||
STEP 0..4:
|
||||
libs: lib1, main
|
||||
dirty js: lib1, main
|
||||
Reference in New Issue
Block a user