[NI] Prioritize type variables related to output type for fixation

This commit is contained in:
Mikhail Zarechenskiy
2017-12-12 14:31:43 +03:00
parent d818af5287
commit c6d8b39b4f
5 changed files with 35 additions and 2 deletions
@@ -0,0 +1,9 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun test() {
generateException(Data(1), { Data(it.x + 2) })
}
fun <T> generateException(a: T, next: (T) -> T) {}
class Data<out K>(val x: K)
@@ -0,0 +1,12 @@
package
public fun </*0*/ T> generateException(/*0*/ a: T, /*1*/ next: (T) -> T): kotlin.Unit
public fun test(): kotlin.Unit
public final class Data</*0*/ out K> {
public constructor Data</*0*/ out K>(/*0*/ x: K)
public final val x: K
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}