mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
new inference: array constructor refs are always exact (IDEA-115725)
(cherry picked from commit 0f6538fc54bbee0aaf6cbab9884c0407937d4568)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
public class InspectorTest {
|
||||
interface Stream<T> {
|
||||
<A> A[] toArray(IntFunction<A[]> generator);
|
||||
}
|
||||
interface IntFunction<R> {
|
||||
R apply(int value);
|
||||
}
|
||||
|
||||
public static void main(Stream<Object> objectStream){
|
||||
varargMethod(String[]::new,
|
||||
objectStream.toArray(String[]::new));
|
||||
}
|
||||
public static <T> void varargMethod(IntFunction<T[]> generator,T[]... a){}
|
||||
}
|
||||
Reference in New Issue
Block a user