[NI] Fix OnlyInputTypes annotation support for top-level captured types

#KT-32157 Fixed
 #KT-32116 Fixed
 #KT-32235 Fixed
 #KT-32218 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-27 10:07:46 +03:00
parent c2cf4aa2b5
commit 42a5c488c1
6 changed files with 146 additions and 10 deletions
@@ -15,11 +15,11 @@ fun test_2(map: Map<A, String>) {
}
fun test_3(m: Map<*, String>) {
val x = <!NI;TYPE_INFERENCE_ONLY_INPUT_TYPES!>m[42]<!> // should be ok
val x = m[42] // should be ok
}
fun test_4(m: Map<out Number, String>) {
val x = m.<!NI;TYPE_INFERENCE_ONLY_INPUT_TYPES!>get<!>(42) // should be ok
val x = m.get(42) // should be ok
}
fun test_5(map: Map<B, Int>, a: A) {