deprecating types after colon

This commit is contained in:
Dmitry Jemerov
2015-04-21 18:32:31 +02:00
parent b7a4b3c17d
commit f374eec8f1
268 changed files with 1055 additions and 769 deletions
@@ -1,3 +1,5 @@
// !CHECK_TYPE
package g
import java.util.HashSet
@@ -6,5 +8,5 @@ fun <T, C: Collection<T>> convert(src: Collection<T>, dest: C): C = throw Except
fun test(l: List<Int>) {
//todo should be inferred
val r = <!TYPE_INFERENCE_UPPER_BOUND_VIOLATED!>convert<!>(l, <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>HashSet<!>())
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>r<!>: Int
checkSubtype<Int>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>r<!>)
}
@@ -1,3 +1,5 @@
// !CHECK_TYPE
package s
trait In<in T>
@@ -13,7 +15,7 @@ fun test(inA: In<A>, inB: In<B>, inC: In<C>) {
<!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>foo<!>(inA, inB)
val r = foo(inA, inC)
r: C
checkSubtype<C>(r)
val c: C = foo(inA, inB)
@@ -24,7 +26,7 @@ fun <T: C> bar(in1: In<T>): T = throw Exception("$in1")
fun test(inA: In<A>) {
val r = bar(inA)
r: C
checkSubtype<C>(r)
}
fun use(vararg a: Any?) = a