Community
Participate
Working Groups
Consider this snippet: int a = 1; while (a > 0) { if (a > 0) { break; } int b = 1; a = b; } When trying to extract the last two lines in the loop (presumably to become "a = get1();"), Eclipse tells me Ambiguous return value: Selected block modifies more than one local variable used in subsequent code. Affected variables are: int a int b There seems to be no "subsequent code" touching "b". If I remove the break statement, the refactoring works as I suspected.
Forward to UI for comment
Issue is reproducible using Eclipse build id: I20130618-0800 The problem seems to be in ExtractMethodAnalyzer#analyzeSelection(..)
The issue is still reproducible using Eclipse Version: Luna Service Release 2 (4.4.2)Build id: 20150219-0600.
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.
This problem is still reproducible with 4.17 build I20200818