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 261517 - Bad implicit type conversion
Summary: Bad implicit type conversion
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.2
Hardware: PC Other
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-12 19:29 UTC by soldatov
Modified: 2016-07-13 01:49 UTC (History)
0 users

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 2016-05-12 19:29:45 UTC
C++ code:
#include <wchar.h>

int main() {
     static_cast<signed char> (1) + 1;
     static_cast<long long> (1) + 1;
     static_cast<wchar_t> (1) + 1;
}

Scenario:
- Select any "static_cast<...> (1) + 1" line
- Press Alt+Shift+V (Refactor|Introduce Variable... menu item)
==> "Invalid Selection" window appears

P.S. In "auto a = static_cast<signed char> (1) + 1;" case IDE thinks 'a' has '<null>' type.
Comment 1 Alexander Simon 2016-05-19 10:49:34 UTC
Code model cannot resolve type of a selection.
Comment 2 petrk 2016-07-12 14:54:59 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/259c9c675804
Comment 3 Quality Engineering 2016-07-13 01:49:47 UTC
Integrated into 'main-silver', will be available in build *201607130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/259c9c675804
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #261517 - Bad implicit type conversion