[FIR] Update testdata according to KT-45223
This commit is contained in:
committed by
TeamCityServer
parent
af79265f42
commit
b31b293eef
+3
-3
@@ -150,14 +150,14 @@ class Y2 : X() {
|
|||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
X().remove("")
|
X().remove("")
|
||||||
X().removeAt(1)
|
X().<!AMBIGUITY!>removeAt<!>(1)
|
||||||
|
|
||||||
val y: MutableList<String> = Y()
|
val y: MutableList<String> = Y()
|
||||||
y.removeAt(1)
|
y.removeAt(1)
|
||||||
|
|
||||||
Y().remove("")
|
Y().remove("")
|
||||||
Y().removeAt(1)
|
Y().<!AMBIGUITY!>removeAt<!>(1)
|
||||||
|
|
||||||
X().remove("")
|
X().remove("")
|
||||||
X().removeAt(1)
|
X().<!AMBIGUITY!>removeAt<!>(1)
|
||||||
}
|
}
|
||||||
|
|||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
// JAVAC_EXPECTED_FILE
|
||||||
|
// FILE: A.java
|
||||||
|
abstract public class A extends B {
|
||||||
|
public Integer removeAt(int x) { }
|
||||||
|
public boolean remove(Integer x) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: main.kt
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
abstract class B : MutableList<Int>, AbstractList<Int>() {
|
||||||
|
override fun removeAt(index: Int): Int = null!!
|
||||||
|
override fun remove(element: Int): Boolean = null!!
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class D : AbstractList<Int>() {
|
||||||
|
// removeAt() doesn't exist in java/util/AbstractList, it's a
|
||||||
|
// fake override of the method from kotlin/collections/MutableList
|
||||||
|
override fun removeAt(index: Int): Int = null!!
|
||||||
|
// AbstractList::remove() should return Int here. No fake overrides created.
|
||||||
|
// This may be a bug because the old compiler doesn't report a diagnostic here.
|
||||||
|
override fun remove(element: Int): Boolean = null!!
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main(a: A, b: B, c: ArrayList<Int>) {
|
||||||
|
a.remove(1)
|
||||||
|
a.<!AMBIGUITY!>removeAt<!>(0)
|
||||||
|
b.remove(1)
|
||||||
|
b.removeAt(0)
|
||||||
|
c.remove(1)
|
||||||
|
c.removeAt(0)
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
// FIR_IDENTICAL
|
|
||||||
// JAVAC_EXPECTED_FILE
|
// JAVAC_EXPECTED_FILE
|
||||||
// FILE: A.java
|
// FILE: A.java
|
||||||
abstract public class A extends B {
|
abstract public class A extends B {
|
||||||
|
|||||||
Reference in New Issue
Block a user