Removed hacks for code migration from ConstraintSystemImpl.

This commit is contained in:
Stanislav Erokhin
2016-01-25 16:15:20 +03:00
parent 7703252239
commit e53e152f83
14 changed files with 23 additions and 36 deletions
@@ -3,7 +3,7 @@ interface A
class B : A
fun foo1(list: List<A>, arg: B?): Boolean {
// Type mismatch
return <!TYPE_MISMATCH!>arg<!> in list
return arg <!TYPE_INFERENCE_ONLY_INPUT_TYPES!>in<!> list // resolved to extension
}
fun foo2(list: List<A>, arg: B?): Boolean {
// FAKE: no cast needed
@@ -10,6 +10,6 @@ public fun <T> Iterable<T>.contains1(element: @kotlin.internal.NoInfer T): Boole
fun test() {
val a: Int = listOf(1).contains1("")
val a: Boolean = listOf(1).<!TYPE_INFERENCE_INCORPORATION_ERROR!>contains1<!>(<!TYPE_MISMATCH!>""<!>)
val b: Boolean = listOf(1).contains1(1)
}
@@ -17,9 +17,9 @@ public fun <K, V> Map<K, V>.get1(key: Any?): Int = null!!
public fun <@kotlin.internal.OnlyInputTypes K, V> Map<out K, V>.get1(key: K): V? = null!!
fun test(map: Map<Int, String>) {
val a: Int = listOf(1).contains1("")
val a: Int = listOf(1).<!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH!>contains1("")<!>
val b: Boolean = listOf(1).contains1(1)
val c: Int = map.get1("")
val c: String? = map.<!TYPE_INFERENCE_ONLY_INPUT_TYPES!>get1<!>("")
val d: String? = map.get1(1)
}