Community
Participate
Working Groups
The "Refactor > Inline" refactoring produces correct output for most cases, but in some cases, the output would need a type witness, which is not generated e.g. when inlining the stream variable: // ---------------------------- import java.util.stream.Stream; public class X { void m() { Stream<Integer> stream = Stream.of(); System.out.println(stream.reduce(0, Math::addExact)); } } // ---------------------------- Inlining the stream variable produces // ---------------------------- import java.util.stream.Stream; public class X { void m() { System.out.println(Stream.of().reduce(0, Math::addExact)); } } // ---------------------------- Which does not compile in Java 11. The correct output would have been: // ---------------------------- import java.util.stream.Stream; public class X { void m() { System.out.println(Stream.<Integer>of().reduce(0, Math::addExact)); } } // ----------------------------
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Still occurs on 2021-06.