Unused symbol: do not use body of function literal as scope for members
So #KT-10546 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
4b25317ecb
commit
7ae722492f
@@ -0,0 +1,16 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {
|
||||
val xs = listOf(1, 2, 3).flatMap { x ->
|
||||
listOf(3, 4, 5).map { y ->
|
||||
object {
|
||||
val <caret>value = x + y
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
xs.forEach {
|
||||
println("value: " + it.value)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun testDC(): String {
|
||||
val x = run {
|
||||
object {
|
||||
val <caret>users = "XXX"
|
||||
}
|
||||
}
|
||||
|
||||
return x.users
|
||||
}
|
||||
Reference in New Issue
Block a user