blob: 3be2b4836a4fef0f8616c0b499c159cf5e1c71cd [file]
// FILE: IntOverridesComparable.java
package test;
class ExtendsB extends B {
void test() {
int x = foo();
Integer y = foo();
Object z = foo();
}
}
class ExtendsC extends C {
void test() {
int x = foo();
Integer y = foo();
Object z = foo();
}
@Override
public Integer foo() { return 42; }
}
// FILE: IntOverridesComparable.kt
package test
interface A<T : Comparable<T>> {
fun foo(): T
}
open class B : A<Int> {
override fun foo(): Int = 42
}
abstract class C : A<Int>