Fix property lookup in data class component generation
#KT-49812 Fixed #KT-49936 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
data class Foo(val result: Result<Boolean>) {
|
||||
val Boolean.result: String get() = if (this) "OK" else "Fail"
|
||||
|
||||
fun f(): String =
|
||||
result.getOrNull()!!.result
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
Foo(Result.success(true)).f()
|
||||
@@ -0,0 +1,5 @@
|
||||
data class A(val x: String) {
|
||||
val Int.x: Int get() = this
|
||||
}
|
||||
|
||||
fun box(): String = A("OK").component1()
|
||||
Reference in New Issue
Block a user