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 228146 - Navigating to function with the same name as class jumps to the class constructor
Summary: Navigating to function with the same name as class jumps to the class constru...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 09:16 UTC by petrk
Modified: 2016-10-31 10:17 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 petrk 2013-04-02 09:16:20 UTC
#include <iostream>

using namespace std;


class a {
    int b;
    
public:    
    a(int val) : b(val) {
        cout << "Constructor called! Value = " << val << endl;
    }
};

void a(int val) {
    cout << "Function called! Value = " << val << endl;
}

int main(int argc, char** argv) {
    a(10);  // click here navigates to constructor
    return 0;
}
Comment 1 Vladimir Kvashin 2014-10-01 11:46:04 UTC
I would downgrade this to P4. And in any case I wouldn't recommend writing such a perverted code.