NI: decrease fixation priority for variables which have only incorporated from upper bound constraints
^KT-40045 Fixed ^KT-39633 Fixed
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -CAST_NEVER_SUCCEEDS
|
||||
// Issue: KT-40045
|
||||
|
||||
interface AAA
|
||||
|
||||
fun <K : AAA, R : K> assign(dest: R, vararg src: K?): R = null as R
|
||||
|
||||
class DIV(val tabIndex: String): AAA
|
||||
|
||||
fun <T: AAA> jsObject(builder: T.() -> Unit): T = null as T
|
||||
|
||||
fun foo(x: DIV) {
|
||||
assign(x, jsObject { tabIndex }) // tabIndex is resolved in OI and unresolved in NI because T is inferred to Any instead of DIV
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ K : AAA, /*1*/ R : K> assign(/*0*/ dest: R, /*1*/ vararg src: K? /*kotlin.Array<out K?>*/): R
|
||||
public fun foo(/*0*/ x: DIV): kotlin.Unit
|
||||
public fun </*0*/ T : AAA> jsObject(/*0*/ builder: T.() -> kotlin.Unit): T
|
||||
|
||||
public interface AAA {
|
||||
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
|
||||
}
|
||||
|
||||
public final class DIV : AAA {
|
||||
public constructor DIV(/*0*/ tabIndex: kotlin.String)
|
||||
public final val tabIndex: kotlin.String
|
||||
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
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// Issue: KT-39633
|
||||
|
||||
interface Proxy<in D>
|
||||
|
||||
class A<E : Any>(val left: E) : Proxy<E>
|
||||
|
||||
abstract class Api {
|
||||
abstract fun <T> magic(): T
|
||||
inline fun <reified A : Any> match(proxy: Proxy<A>): A = magic()
|
||||
inline fun <reified B : Any> f(x: B): B = g(x)
|
||||
inline fun <reified C : Any> g(x: C) = match(A(x))
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package
|
||||
|
||||
public final class A</*0*/ E : kotlin.Any> : Proxy<E> {
|
||||
public constructor A</*0*/ E : kotlin.Any>(/*0*/ left: E)
|
||||
public final val left: E
|
||||
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
|
||||
}
|
||||
|
||||
public abstract class Api {
|
||||
public constructor Api()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final inline fun </*0*/ reified B : kotlin.Any> f(/*0*/ x: B): B
|
||||
public final inline fun </*0*/ reified C : kotlin.Any> g(/*0*/ x: C): C
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract fun </*0*/ T> magic(): T
|
||||
public final inline fun </*0*/ reified A : kotlin.Any> match(/*0*/ proxy: Proxy<A>): A
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface Proxy</*0*/ in D> {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user