Community
Participate
Working Groups
When method A.m is moved to class B without leaving behind a delegate, class creation new A() is not evaluated after the move. That is because JDT does not introduce an extra parameter of type A when method m has no references to the members of A. It changes program behavior when the prefix expression of m invocation causes side effects. BEFORE ----------------------------------- class A { void m(B b) {} void n() { new A().m(new B()); } } AFTER ----------------------------------- class A { void n() { new B().m(); // BUG: new A() is removed } } class B { void m() {} }
The extra parameter (of original class type A) is unnecessary only when the prefixes of all method invocations are simple variables, which are free from side-effects.
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 an issue in 4.12 M1.