[FIR] Fixed Replace ConeTypeVariable on ConeTypeParameter ^KT-51017
in AbstractConeCallConflictResolver.computeParameterTypes
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-51017
|
||||
|
||||
interface A
|
||||
interface B : A
|
||||
|
||||
fun <V : A> V.foo(): V = this
|
||||
fun <T : B> T.foo(): T = this
|
||||
|
||||
fun test(list: List<B>) {
|
||||
B::foo // No ambiguity, T.foo wins
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ list: kotlin.collections.List<B>): kotlin.Unit
|
||||
public fun </*0*/ T : B> T.foo(): T
|
||||
public fun </*0*/ V : A> V.foo(): V
|
||||
|
||||
public interface A {
|
||||
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 interface B : A {
|
||||
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
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// KT-11075 NONE_APPLICABLE reported for callable reference to an overloaded generic function with expected type provided
|
||||
|
||||
object TestCallableReferences {
|
||||
fun <A> foo(x: A) = x
|
||||
fun <B> foo(x: List<B>) = x
|
||||
|
||||
fun test0(): (String) -> String = TestCallableReferences::foo
|
||||
|
||||
fun <T> test1(): (List<T>) -> List<T> = TestCallableReferences::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// KT-11075 NONE_APPLICABLE reported for callable reference to an overloaded generic function with expected type provided
|
||||
|
||||
object TestCallableReferences {
|
||||
|
||||
Reference in New Issue
Block a user