FIR: add resolve test for potential local scope problems
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
val x = object {
|
||||
val someString = "123"
|
||||
|
||||
private fun foo(): Unit = with(someString) {
|
||||
val presentations = mutableListOf<String>()
|
||||
bar(true)?.let {
|
||||
presentations.add(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun bar(arg: Boolean) = with(someString) {
|
||||
if (arg) this else null
|
||||
}
|
||||
}
|
||||
|
||||
fun owner() {
|
||||
class Local {
|
||||
val someString = "123"
|
||||
|
||||
private fun foo(): Unit = with(someString) {
|
||||
val presentations = mutableListOf<String>()
|
||||
bar(true)?.let {
|
||||
presentations.add(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun bar(arg: Boolean) = with(someString) {
|
||||
if (arg) this else null
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user