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 243594 - Unable to resolve identifiers with unique_ptr alias
Summary: Unable to resolve identifiers with unique_ptr alias
Status: CLOSED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: PC Other
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-06 05:38 UTC by kosmonaffft
Modified: 2015-05-28 07:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot. (46.16 KB, image/png)
2014-04-06 05:38 UTC, kosmonaffft
Details
Test project. (12.52 KB, application/x-zip-compressed)
2014-04-06 05:38 UTC, kosmonaffft
Details
Screenshot 2. (65.31 KB, image/png)
2014-04-08 17:26 UTC, kosmonaffft
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kosmonaffft 2014-04-06 05:38:34 UTC
Created attachment 146578 [details]
Screenshot.

See screenshot and attached test project...
If X::Y namespace, A and B classes are in the main.cpp file completion of _a->foo() works fine, but if i split declarations as in project, NB cannot resolve any members of _a...

Project compiles successfully (need c++11 support for using types alias)...
Comment 1 kosmonaffft 2014-04-06 05:38:56 UTC
Created attachment 146579 [details]
Test project.
Comment 2 petrk 2014-04-06 12:39:09 UTC
Actually this is a regression in nightly build, in nb8.0rc1 works perfect. 
Test case for regression:
 
=====================================================
#include <memory>

struct AAA {
    int foo() {return 0;};
};

int main() {
    std::unique_ptr<AAA> a;
    a->foo(); // foo is unresolved
    return 0;
} 
=====================================================
Comment 4 Quality Engineering 2014-04-08 06:09:19 UTC
Integrated into 'main-silver', will be available in build *201404080419* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/754843d18418
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #243594 - Unable to resolve identifiers with unique_ptr alias
Comment 5 kosmonaffft 2014-04-08 17:24:59 UTC
Not fixed yet...
See new screenshot (made with test project in attachments).
Comment 6 kosmonaffft 2014-04-08 17:26:18 UTC
Created attachment 146631 [details]
Screenshot 2.
Comment 7 kosmonaffft 2014-04-08 17:28:25 UTC
Product Version: NetBeans IDE Dev (Build 201404080419)
Comment 8 petrk 2014-04-09 09:33:48 UTC
Hmm, for me it works. I'm pretty sure that you've deleted cachedir before testing, so it only could be difference in header files. I'm using g++ 4.8.1 and what is your compiler?
Comment 9 petrk 2014-04-09 09:45:53 UTC
Another interesting thing - I downloaded test project again and foo was unresolved in it until the project was reparsed (However, it could be because of an error about mismatched platforms which I have to resolve when I'm opening project from your machine). Cache dir was empty at that moment, so it is worth to reparse the whole project.
Comment 10 petrk 2014-04-09 10:51:50 UTC
Thanks, there was actually a problem with reading type aliases from cache. I didn't notice it because all clients in my IDE are turned off in order to make debugging more simple and there were no requests to cache. Hope, now it will work.

Fixed in http://hg.netbeans.org/cnd-main/rev/2cb710e5c605
Comment 11 Quality Engineering 2014-04-10 02:02:19 UTC
Integrated into 'main-silver', will be available in build *201404100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2cb710e5c605
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Additional fix for #243594 - Unable to resolve identifiers with unique_ptr alias
-- fixed repository handler for type aliases
Comment 12 Quality Engineering 2014-04-24 02:16:50 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/fcd891bf5f01
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #243594 - Unable to resolve identifiers with unique_ptr alias
(transplanted from 754843d1841888269ff0642e33727d1b1451d971)
Comment 13 pinbender 2015-03-05 19:40:21 UTC
This test project is still broken in build 201411181905.
Comment 14 petrk 2015-03-18 15:35:11 UTC
Please, check again in current development version. If it doesn't not work for you, we will elaborate on the bug. The issue may be related to the version of compiler or to OS for instance.