[FE 1.0] Don't fail candidates which were marked with compatibility resolve previously
^KT-52431 Fixed ^KT-52393 Fixed
This commit is contained in:
committed by
teamcity
parent
73d676d9de
commit
02a430875f
+17
@@ -0,0 +1,17 @@
|
||||
class Wrapper<T>
|
||||
|
||||
class WrapperFunctions {
|
||||
infix fun <T : Comparable<T>, S : T?> Wrapper<in S>.greaterEq(t: T): Unit = Unit
|
||||
|
||||
infix fun <T : Comparable<T>, S : T?> Wrapper<in S>.greaterEq(other: Wrapper<in S>): Unit = Unit // if this function is removed, it also works
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val wrapper = Wrapper<Long>()
|
||||
val number: Int = 5 // doesn't work
|
||||
// val number: Long = 5 // works
|
||||
|
||||
with (WrapperFunctions()) {
|
||||
<!ARGUMENT_TYPE_MISMATCH!>wrapper <!NONE_APPLICABLE!>greaterEq<!> number<!>
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
class Wrapper<T>
|
||||
|
||||
class WrapperFunctions {
|
||||
infix fun <T : Comparable<T>, S : T?> Wrapper<in S>.greaterEq(t: T): Unit = Unit
|
||||
|
||||
infix fun <T : Comparable<T>, S : T?> Wrapper<in S>.greaterEq(other: Wrapper<in S>): Unit = Unit // if this function is removed, it also works
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val wrapper = Wrapper<Long>()
|
||||
val number: Int = 5 // doesn't work
|
||||
// val number: Long = 5 // works
|
||||
|
||||
with (WrapperFunctions()) {
|
||||
wrapper <!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>greaterEq<!> number
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
|
||||
public final class Wrapper</*0*/ T> {
|
||||
public constructor Wrapper</*0*/ T>()
|
||||
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 WrapperFunctions {
|
||||
public constructor WrapperFunctions()
|
||||
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 infix fun </*0*/ T : kotlin.Comparable<T>, /*1*/ S : T?> Wrapper<in S>.greaterEq(/*0*/ t: T): kotlin.Unit
|
||||
public final infix fun </*0*/ T : kotlin.Comparable<T>, /*1*/ S : T?> Wrapper<in S>.greaterEq(/*0*/ other: Wrapper<in S>): kotlin.Unit
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
interface Expression<K>
|
||||
|
||||
interface ExpressionWithColumnType<K> : Expression<K>
|
||||
|
||||
class Column<T>: ExpressionWithColumnType<T>
|
||||
|
||||
infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.less(t: T) {}
|
||||
|
||||
infix fun <T : Comparable<T>, S : T?> Expression<in S>.less(other: Expression<in S>) {}
|
||||
|
||||
fun main(x: Column<Long?>, y: Double) {
|
||||
x <!NONE_APPLICABLE!>less<!> y // error in 1.7.20, no error in 1.7.0
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
interface Expression<K>
|
||||
|
||||
interface ExpressionWithColumnType<K> : Expression<K>
|
||||
|
||||
class Column<T>: ExpressionWithColumnType<T>
|
||||
|
||||
infix fun <T : Comparable<T>, S : T?> ExpressionWithColumnType<in S>.less(t: T) {}
|
||||
|
||||
infix fun <T : Comparable<T>, S : T?> Expression<in S>.less(other: Expression<in S>) {}
|
||||
|
||||
fun main(x: Column<Long?>, y: Double) {
|
||||
x <!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>less<!> y // error in 1.7.20, no error in 1.7.0
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package
|
||||
|
||||
public fun main(/*0*/ x: Column<kotlin.Long?>, /*1*/ y: kotlin.Double): kotlin.Unit
|
||||
public infix fun </*0*/ T : kotlin.Comparable<T>, /*1*/ S : T?> Expression<in S>.less(/*0*/ other: Expression<in S>): kotlin.Unit
|
||||
public infix fun </*0*/ T : kotlin.Comparable<T>, /*1*/ S : T?> ExpressionWithColumnType<in S>.less(/*0*/ t: T): kotlin.Unit
|
||||
|
||||
public final class Column</*0*/ T> : ExpressionWithColumnType<T> {
|
||||
public constructor Column</*0*/ T>()
|
||||
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 Expression</*0*/ 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
|
||||
}
|
||||
|
||||
public interface ExpressionWithColumnType</*0*/ K> : Expression<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
|
||||
}
|
||||
Reference in New Issue
Block a user