Resolve invoke on any kind of expressions, not only on simple name expressions

This commit is contained in:
Svetlana Isakova
2014-02-04 19:07:06 +04:00
parent c7087d170e
commit a829da185d
31 changed files with 391 additions and 101 deletions
@@ -0,0 +1,8 @@
//KT-3821 Invoke convention doesn't work for `this`
class A() {
fun invoke() = 42
fun foo() = this() // Expecting a function type, but found A
}
fun box() = if (A().foo() == 42) "OK" else "fail"