Add test for issue KT-23582
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
$TESTDATA_DIR$/separateModules/sepModule1.kt
|
||||
-meta-info
|
||||
-output
|
||||
$TEMP_DIR$/m1/m.js
|
||||
---
|
||||
$TESTDATA_DIR$/separateModules/sepModule2.kt
|
||||
-libraries
|
||||
$TEMP_DIR$/m1
|
||||
-output
|
||||
$TEMP_DIR$/m2/m.js
|
||||
@@ -0,0 +1,2 @@
|
||||
warning: module "m" depends from module with the same name
|
||||
OK
|
||||
@@ -0,0 +1 @@
|
||||
// NOT_CONTAINS: m2/m.js, foo(bar$lambda);
|
||||
@@ -0,0 +1,10 @@
|
||||
$TESTDATA_DIR$/separateModules/sepModule3.kt
|
||||
-meta-info
|
||||
-output
|
||||
$TEMP_DIR$/m3/m.js
|
||||
---
|
||||
$TESTDATA_DIR$/separateModules/sepModule4.kt
|
||||
-libraries
|
||||
$TEMP_DIR$/m3
|
||||
-output
|
||||
$TEMP_DIR$/m4/m.js
|
||||
@@ -0,0 +1,2 @@
|
||||
warning: module "m" depends from module with the same name
|
||||
OK
|
||||
@@ -0,0 +1 @@
|
||||
// NOT_CONTAINS: m4/m.js, foofaa();
|
||||
@@ -0,0 +1,6 @@
|
||||
package m1
|
||||
|
||||
inline fun foo(action: () -> Int): Int {
|
||||
return action()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package m2
|
||||
|
||||
import m1.*
|
||||
|
||||
fun bar(): Int {
|
||||
foo { return 100 }
|
||||
return -99
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (bar() == 100) return "OK"
|
||||
return "fail"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package m3
|
||||
|
||||
|
||||
fun foofaa(): Unit { }
|
||||
|
||||
inline fun foo(action: () -> Int): Int {
|
||||
foofaa()
|
||||
return action()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package m4
|
||||
|
||||
import m3.*
|
||||
|
||||
inline fun foo(action: () -> Int): Int {
|
||||
return action()
|
||||
}
|
||||
|
||||
fun bar(): Int {
|
||||
foo { return 100 }
|
||||
return -99
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (bar() == 100) return "OK"
|
||||
return "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user