Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/kt3298.kt
T
Alexander Udalov 8b918ef1aa Add regression tests for obsolete issues
#KT-1291 Obsolete
 #KT-2895 Obsolete
 #KT-3060 Obsolete
 #KT-3298 Obsolete
 #KT-3613 Obsolete
 #KT-3862 Obsolete
2014-02-13 04:43:53 +04:00

14 lines
256 B
Kotlin

var result = ""
fun result(r: String) { result = r }
object Foo {
private fun String.plus() = "(" + this + ")"
fun foo() = { result(+"Stuff") }()
}
fun box(): String {
Foo.foo()
return if (result == "(Stuff)") "OK" else "Fail $result"
}