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 243083 - unresolved method after dereferencing template based interator
Summary: unresolved method after dereferencing template based interator
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-20 11:45 UTC by Vladimir Voskresensky
Modified: 2014-09-19 14:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch to fix resolving of nested template based parameters (19.37 KB, patch)
2014-07-30 20:04 UTC, petrk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2014-03-20 11:45:34 UTC
there are two warnings about unresolve, but have to be resolved.
-----------------------------------------------------------------
template <typename EntryType> struct SpecEntryTraits {
    typedef EntryType DeclType;

  };

template <typename EntryType,
          typename _SETraits = SpecEntryTraits<EntryType>,
          typename _DeclType = typename _SETraits::DeclType>
struct SpecIterator {
    typedef _SETraits SETraits;
    typedef _DeclType DeclType;
    
    DeclType foo() {
        return DeclType();
    }
    
    DeclType *operator*() const {
        return 0;
    }
    DeclType *operator->() const { return 0; }
    
}; 

struct AAA {
    int boo() {
        return 1;
    }
};

typedef SpecIterator<AAA> spec_iterator;

void mainddd() {
    spec_iterator I;
    (*I)->boo(); // boo is unresolved with warning
    I.foo().boo(); // boo is unresolved with warning
}
Comment 1 petrk 2014-07-23 20:13:59 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/e291e4275f43
Comment 2 Quality Engineering 2014-07-25 02:36:46 UTC
Integrated into 'main-silver', will be available in build *201407250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e291e4275f43
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #243083 - unresolved method after dereferencing template based interator
Comment 3 petrk 2014-07-30 20:04:13 UTC
Created attachment 148431 [details]
Patch to fix resolving of nested template based parameters

This fix takes into account issue from bug 246088, but it is unsafe, so will be applied only after branching for 801
Comment 4 petrk 2014-07-31 13:15:17 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/f8f718c019de
Comment 5 Quality Engineering 2014-08-01 02:09:19 UTC
Integrated into 'main-silver', will be available in build *201408010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f8f718c019de
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #243083 - unresolved method after dereferencing template based interator
Comment 6 Quality Engineering 2014-09-17 12:14:28 UTC
Integrated into 'releases/release801', will be available in build *201409171118* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/166de23d2eba
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #243083 - unresolved method after dereferencing template based interator
(transplanted from f8f718c019de3863c9fe78aaa81326335f052f32)
Comment 7 soldatov 2014-09-19 14:45:35 UTC
Verified in NetBeans 8.0.1 patch1

-------------------------------------------------------------------------------
>Log Session: Friday, September 19, 2014 12:00:43 PM MSK
>System Info: 
  Product Version         = NetBeans IDE 8.0.1 (Build 201409182200) (#8819efffa95e)
  Operating System        = SunOS version 5.11 running on amd64
  Java; VM; Vendor        = 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.8.0_05-b13
  Java Home               = /usr/jdk/instances/jdk1.8.0/jre