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.

Bug 238688 - "Introduce variable" doesn't work in "foo() + 1" case
Summary: "Introduce variable" doesn't work in "foo() + 1" case
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.4
Hardware: PC Solaris
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-22 09:34 UTC by soldatov
Modified: 2014-11-13 15:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2013-11-22 09:34:30 UTC
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"
Comment 1 Alexander Simon 2013-11-22 09:52:53 UTC
Investigation:
Code model cannot detect type of the expression.
Comment 2 petrk 2014-10-08 19:27:04 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/fc73398b958c
Comment 3 Quality Engineering 2014-10-10 03:10:58 UTC
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
Comment 4 soldatov 2014-11-07 11:17:46 UTC
verified in trunk (NetBeans IDE Dev (Build 201411070002))
Comment 5 Quality Engineering 2014-11-10 23:20:02 UTC
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)
Comment 6 Alexander Pepin 2014-11-13 15:30:42 UTC
Verified in patch2 build 20141110.