Revert "[NI] Support @OnlyInputTypes annotation. #KT-29307 fixed"

This reverts commit 90628112
With that annotation there is complex bug that breaks build of Kotlin compiler
This commit is contained in:
Dmitriy Novozhilov
2019-03-18 18:51:52 +03:00
parent 25b3f62767
commit d01b6ef900
20 changed files with 31 additions and 210 deletions
@@ -1,31 +0,0 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
// !WITH_NEW_INFERENCE
// ISSUE: KT-29307
fun test_1(map: Map<String, String>) {
val x = <!NI;TYPE_INFERENCE_ONLY_INPUT_TYPES!>map[<!OI;CONSTANT_EXPECTED_TYPE_MISMATCH!>42<!>]<!> // OK
}
open class A
class B : A()
fun test_2(map: Map<A, String>) {
val x = <!NI;TYPE_INFERENCE_ONLY_INPUT_TYPES!>map[<!OI;CONSTANT_EXPECTED_TYPE_MISMATCH!>42<!>]<!>
}
fun test_3(m: Map<*, String>) {
val x = m[42] // should be ok
}
fun test_4(m: Map<out Number, String>) {
val x = m.get(42) // should be ok
}
fun test_5(map: Map<B, Int>, a: A) {
map.get(a)
}
fun test_6(map: Map<A, Int>, b: B) {
map.get(b)
}