FIR: Support proper implicit return type computation for local classes

This commit is contained in:
Denis Zharkov
2020-03-20 16:43:16 +03:00
parent 94193c91a0
commit cdd7e41891
14 changed files with 377 additions and 38 deletions
@@ -0,0 +1,16 @@
private val x = object {
fun foo(x: Int) = /* here we have not computed return type for "bar" */bar(x)
fun bar(y: Int) = this.hashCode() + y > 0
val w get() = z
val z get() = this.hashCode() == 0
}
fun useBoolean(b: Boolean) {}
fun main() {
useBoolean(x.foo(1))
useBoolean(x.bar(2))
useBoolean(x.w)
useBoolean(x.z)
}