more tests on type inference

#KT-2200 fixed
 #KT-2283 fixed
This commit is contained in:
Svetlana Isakova
2012-08-07 15:43:54 +04:00
parent a98bc541f5
commit 9102622e02
4 changed files with 50 additions and 0 deletions
@@ -0,0 +1,13 @@
package a
import java.util.*
fun g<T> (<!UNUSED_PARAMETER!>f<!>: () -> List<T>) : T {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
fun test() {
//here possibly can be a cycle on constraints
val <!UNUSED_VARIABLE!>x<!> = g { Collections.<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyList<!>() }
val <!UNUSED_VARIABLE!>y<!> = g<Int> { Collections.emptyList()!! }
val <!UNUSED_VARIABLE!>z<!> : List<Int> = g { Collections.emptyList()!! }
}