Remove wrong condition part: there could be irrelevant overrides from Kotlin
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
public class J {
|
||||
public static class A extends AImpl implements CharSequence {
|
||||
public CharSequence subSequence(int start, int end) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
abstract class AImpl {
|
||||
fun charAt(index: Int): Char {
|
||||
return 'A'
|
||||
}
|
||||
|
||||
fun length(): Int {
|
||||
return 56
|
||||
}
|
||||
}
|
||||
|
||||
class X : J.A()
|
||||
|
||||
fun box(): String {
|
||||
val x = X()
|
||||
if (x.length != 56) return "fail 1"
|
||||
if (x[0] != 'A') return "fail 2"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user