Moved 'Exact' and 'NoInfer' annotations to stdlib

This commit is contained in:
Svetlana Isakova
2015-10-12 18:15:48 +03:00
parent 30d697109c
commit 075a8eaf39
9 changed files with 53 additions and 44 deletions
@@ -0,0 +1,11 @@
//!DIAGNOSTICS: -UNUSED_VARIABLE
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
fun <T, U: T> List<@Exact T>.firstTyped(): U = throw Exception()
fun test1(l: List<Number>) {
val i: Int = l.firstTyped()
val s: String = l.<!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>firstTyped<!>()
}