mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
19 lines
393 B
Java
19 lines
393 B
Java
class Main {
|
|
|
|
void perform(Runnable r) {
|
|
System.out.println(r);
|
|
}
|
|
|
|
<T extends Throwable> void perform(TRunnable<T> r) {
|
|
System.out.println(r);
|
|
}
|
|
|
|
|
|
interface TRunnable<T extends Throwable> {
|
|
void run() throws T;
|
|
}
|
|
|
|
{
|
|
<error descr="Ambiguous method call: both 'Main.perform(Runnable)' and 'Main.perform(TRunnable<Throwable>)' match">perform</error>(() -> {});
|
|
}
|
|
} |