analyze labeled function literals as usual ones

(specially as function literals, not as other expressions)
This commit is contained in:
Svetlana Isakova
2013-08-27 16:12:49 +04:00
parent 8f29968183
commit fd5a2056c1
4 changed files with 35 additions and 10 deletions
@@ -0,0 +1,15 @@
package h
//traits to make ambiguity with function literal as an argument
trait A
trait B
trait C: A, B
fun foo<T>(<!UNUSED_PARAMETER!>a<!>: A, f: () -> T): T = f()
fun foo<T>(<!UNUSED_PARAMETER!>b<!>: B, f: () -> T): T = f()
fun test(c: C) {
<!CANNOT_COMPLETE_RESOLVE!>foo<!>(c) @f {
c<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
}
}