Bug 269272 - Wrong name lookup results when template parameters are omitted
Wrong name lookup results when template parameters are omitted
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: Code Model
Dev
PC Linux
: P3 (vote)
: 8.2
Assigned To: petrk
issues@cnd
82patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-08 13:46 UTC by petrk
Modified: 2016-12-12 10:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description petrk 2016-12-08 13:46:25 UTC
enum SomeEnum {
    ns_empty, ns_decltype
};

template <SomeEnum ns>
class SomeClass;

class Base {
protected:
    void myfun();
};

template <>
class SomeClass<ns_empty> : public Base {
    typedef SomeClass<ns_decltype> type; // navigation jumps to enclosing class
    
    void foo(void *p) {
        static_cast<SomeClass*>(p)->myfun(); // myfun is unresolved
    }
};


template <>
class SomeClass<ns_decltype> : public Base {
    typedef SomeClass<ns_empty> type; // navigation jumps to enclosing class
    
    void foo(void *p) {
        static_cast<SomeClass*>(p)->myfun(); // here it is resolved
    }
};
Comment 1 petrk 2016-12-09 16:22:15 UTC
Was fixed as part of bug 268671
https://enum.ru.oracle.com/hg/release82/rev/d0078b27348a
Comment 2 soldatov 2016-12-12 10:32:57 UTC
Verified in internal NetBeans 8,2 patch 1 build.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo