Inline: do more precise check before adding this@Labeled #KT-30762 Fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
interface MySeq<T> {
|
||||
fun yield(arg: T)
|
||||
}
|
||||
|
||||
fun <T> mySeq(f: MySeq<T>.() -> Unit): MySeq<T> = null!!
|
||||
|
||||
class Test {
|
||||
fun repro() = mySeq<Int> {
|
||||
inner()
|
||||
}
|
||||
|
||||
private fun <caret>inner() = mySeq<Double> {
|
||||
yield(1.0)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
interface MySeq<T> {
|
||||
fun yield(arg: T)
|
||||
}
|
||||
|
||||
fun <T> mySeq(f: MySeq<T>.() -> Unit): MySeq<T> = null!!
|
||||
|
||||
class Test {
|
||||
fun repro() = mySeq<Int> {
|
||||
mySeq<Double> {
|
||||
yield(1.0)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@ internal object Bar {
|
||||
@JvmStatic fun main(args: Array<String>) {
|
||||
bar(object : Runnable {
|
||||
override fun run() {
|
||||
Foo.doRun()
|
||||
doRun()
|
||||
}
|
||||
|
||||
private fun doRun() {
|
||||
|
||||
Reference in New Issue
Block a user