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 247312 - Navigatoin to overrides with parameters, which type is specialization, is wrong
Summary: Navigatoin to overrides with parameters, which type is specialization, is wrong
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 19:35 UTC by Vladimir Kvashin
Modified: 2014-11-20 11:52 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 Vladimir Kvashin 2014-09-19 19:35:05 UTC
In the example below, navigation from "overrides/overriden" annotations in wrong: it navigates from each of int_visitor methods to the first method in int_visitor_impl. The same with type_visitor and type_visitor_impl.

There is such code in ccfe.

namespace one {
    template<int> class int_spec_class {};

    class int_visitor {
    public:
        virtual void visit(const int_spec_class<1>& ) = 0;
        virtual void visit(const int_spec_class<2>& ) = 0;    
        virtual void visit(const int_spec_class<4>& ) = 0;    
        virtual void visit(const int_spec_class<8>& ) = 0;    
    };

    class int_visitor_impl : public int_visitor {
        virtual void visit(const int_spec_class<1>& ) {};    
        virtual void visit(const int_spec_class<2>& ) {};    
        virtual void visit(const int_spec_class<4>& ) {};    
        virtual void visit(const int_spec_class<8>& ) {};        
    };
}

namespace two {

    struct Point {
        int x;
        int y;
    };

    struct Rect : Point {
        int h;
        int w;
    };

    template<typename> class type_spec_class {
    };

    class type_visitor {
    public:
        virtual void visit(const type_spec_class<Point>&) = 0;
        virtual void visit(const type_spec_class<Rect>&) = 0;
    };

    class type_visitor_impl : public type_visitor {
        virtual void visit(const type_spec_class<Point>&) {
        };
        virtual void visit(const type_spec_class<Rect>&) {
        };
    };    
}