This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Code: int foo() { return 0; } int main(int argc, char** argv) { foo() + 1; return 0; } Scenario: - Select "foo() + 1" and press Alt-Enter ==> no "Introduce variable" or "Assign Return Value To New Variable"
Investigation: Code model cannot detect type of the expression.
Fixed in http://hg.netbeans.org/cnd-main/rev/fc73398b958c
Integrated into 'main-silver', will be available in build *201410100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/fc73398b958c User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #238688 - "Introduce variable" doesn't work in "foo() + 1" case
verified in trunk (NetBeans IDE Dev (Build 201411070002))
Integrated into 'releases/release801', will be available in build *201411102027* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/00741035a1ff User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #238688 - "Introduce variable" doesn't work in "foo() + 1" case (transplanted from fc73398b958cbdf0e4a9738cebcd477e43fd3185)
Verified in patch2 build 20141110.