mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
most specific check for proper functional types fixed
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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<RuntimeException>)' match">perform</error>(() -> {});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user