[FIR] Fix removeAtInt test

This commit is contained in:
Nick
2020-08-24 13:37:11 +03:00
parent 2b983b1c20
commit 05cfb654ba
3 changed files with 68 additions and 3 deletions
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// JAVAC_EXPECTED_FILE
// FILE: A.java
abstract public class A extends B {
@@ -11,7 +10,7 @@ import java.util.*;
abstract class B : MutableList<Int>, AbstractList<Int>() {
override fun removeAt(index: Int): Int = null!!
override fun remove(element: Int): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>Boolean<!> = null!!
override fun remove(element: Int): Boolean = null!!
}
abstract class D : AbstractList<Int>() {
@@ -20,7 +19,7 @@ abstract class D : AbstractList<Int>() {
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): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>Boolean<!> = null!!
override fun remove(element: Int): Boolean = null!!
}
fun main(a: A, b: B, c: ArrayList<Int>) {