toArray(IntFunction<String []>) in Stream cannot be applied
Searched around and I could not find a good answer to this question.
Intellij IDEA 14.1.4 is giving me red underline error on code that compiles and runs fine.
Stream.concat(Arrays.stream(new String[] {"a", "b", "c"}), Arrays.stream(new String[] {"x", "y", "z"}))
.toArray(String[]::new);
Basically, any time you use the Object[]::new IntFunction Intellij balks on it.
Intellij recognizes this format.
Stream.concat(Arrays.stream(new String[] {"a", "b", "c"}), Arrays.stream(new String[] {"x", "y", "z"}))
.toArray(size -> new String[size]);
Is there some setting I am missing or does intellij not recognize the new style IntFunction yet?
请先登录再写评论。
Works fine with IDEA 15 EAP, looks like a fixed bug.
Confirmed that this has been fixed on Linux version IDEA U 14.1.5.
Thanks.