Constraint incorporation
In a constraint system a new bound is incorporated: all new constrains that can be derived from it (and from existing ones) are added
This commit is contained in:
+2
-4
@@ -29,8 +29,7 @@ fun test3() {
|
||||
fun <T, R: T> emptyStrangeMap1(t: T): Map<T, R> = throw Exception("$t")
|
||||
|
||||
fun test4() {
|
||||
//todo we may infer 'Int' for 'R' here
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyStrangeMap1<!>(1)
|
||||
emptyStrangeMap1(1)
|
||||
}
|
||||
|
||||
//--------------
|
||||
@@ -38,8 +37,7 @@ fun test4() {
|
||||
fun <T: A, R: T> emptyStrangeMap2(t: T): Map<T, R> where R: A = throw Exception("$t")
|
||||
|
||||
fun test5(a: A) {
|
||||
//todo we may infer 'A' for 'R' here
|
||||
<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyStrangeMap2<!>(a)
|
||||
emptyStrangeMap2(a)
|
||||
}
|
||||
|
||||
//--------------
|
||||
|
||||
Reference in New Issue
Block a user