mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
most specific: infer specific if method is generic even if type arguments are explicitly provided
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class Test<T> {
|
||||
Test(T arg) {}
|
||||
Test(String arg) {}
|
||||
static <X> Test<X> m(X arg) {return null;}
|
||||
static <X> Test<X> m(String arg) {return null;}
|
||||
|
||||
{
|
||||
m("");
|
||||
Test.<String>m("");
|
||||
new Test<>("");
|
||||
new Test<String><error descr="Cannot resolve constructor 'Test(java.lang.String)'">("")</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user