Moved 'Exact' and 'NoInfer' annotations to stdlib
This commit is contained in:
Vendored
+11
@@ -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<!>()
|
||||
}
|
||||
Reference in New Issue
Block a user