mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 15:53:49 +00:00
26 lines
389 B
Java
Vendored
26 lines
389 B
Java
Vendored
// APPLY_TO_SUPER
|
|
class A {
|
|
int x;
|
|
|
|
A(int x) {
|
|
this.x = x;
|
|
}
|
|
}
|
|
|
|
interface T {
|
|
int foo(int a, int b, int c);
|
|
}
|
|
|
|
class J extends K implements T {
|
|
@Override
|
|
public int foo(int a, int b, int c) {
|
|
return <selection>new A(a + b)</selection>.x * c;
|
|
}
|
|
}
|
|
|
|
class Test {
|
|
void test() {
|
|
new J().foo(1, 2, 3);
|
|
new K().foo(1, 2, 3);
|
|
}
|
|
} |