Don't try to transform sam wrappers in same module
#KT-22304 Fixed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
$TESTDATA_DIR$/kt22304_1.kt
|
||||
$TESTDATA_DIR$/kt22304_2.kt
|
||||
$TESTDATA_DIR$/kt22304_3.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
+1
@@ -0,0 +1 @@
|
||||
OK
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import java.util.concurrent.Callable
|
||||
|
||||
fun test(): String = ""
|
||||
|
||||
inline fun String.switchMapOnce(crossinline mapper: (String) -> String): String {
|
||||
Callable(::test)
|
||||
return { mapper(this) }()
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package beforeTest //package name should be less than imported one
|
||||
|
||||
import test.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
"O".switchMapOnce {
|
||||
|
||||
"K".switchMapOnce {
|
||||
"OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package ttest //package name should be more than imported one
|
||||
|
||||
import test.*
|
||||
|
||||
fun foo(): String {
|
||||
return "O".switchMapOnce {
|
||||
|
||||
"K".switchMapOnce {
|
||||
"OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user