[NI] Fix expicit super receiver check
^KT-37497 Fixed
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// FIR_IDENTICAL
|
||||
// FULL_JDK
|
||||
// Issue: KT-37497
|
||||
|
||||
import java.util.*
|
||||
|
||||
object Bug1 {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
val list = object : ArrayList<String>(listOf("a")) {
|
||||
override fun sort(c: Comparator<in String>?) {
|
||||
super.sort(c)
|
||||
println(c)
|
||||
}
|
||||
}
|
||||
println(list)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package
|
||||
|
||||
public object Bug1 {
|
||||
private constructor Bug1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
@kotlin.jvm.JvmStatic public final fun main(/*0*/ args: kotlin.Array<kotlin.String>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FULL_JDK
|
||||
|
||||
abstract class A : MutableList<String> {
|
||||
|
||||
+1
-2
@@ -1,9 +1,8 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// FULL_JDK
|
||||
|
||||
abstract class A : MutableList<String> {
|
||||
override fun sort(/*0*/ p0: java.util.Comparator<in String>) {
|
||||
<!NI;SUPER_CANT_BE_EXTENSION_RECEIVER!>super<!>.<!NI;DEPRECATION_ERROR, OI;DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET_ERROR!>sort<!>(p0)
|
||||
super.<!DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET_ERROR!>sort<!>(p0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user