Update recorded type for argument in parentheses correctly

This commit is contained in:
Svetlana Isakova
2014-05-08 17:52:28 +04:00
parent 12ddf76df4
commit a3e306b820
4 changed files with 73 additions and 6 deletions
@@ -0,0 +1,20 @@
trait Foo<T>
class Bar {
fun <T> invoke(): Foo<T> = throw Exception()
}
class A {
val bar = Bar()
}
fun fooInt(l: Foo<Int>) = l
fun test(bar: Bar, a: A) {
// no elements with error types
fooInt((bar()))
fooInt(if (true) bar() else bar())
fooInt(@label bar())
fooInt(a.bar())
fooInt(((@label if (true) (a.bar()) else bar())))
}