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 235462 - Wrong navigation to overloaded functions
Summary: Wrong navigation to overloaded functions
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 7.4
Hardware: PC Solaris
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-03 15:13 UTC by petrk
Modified: 2013-12-06 15:22 UTC (History)
1 user (show)

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-09-03 15:13:22 UTC
#include <iostream>

struct AAA {};
struct BBB : AAA {};

template <typename T1, typename T2>
void roo(T1 t1, T2 t2) {
    std::cout << "roo 1" << std::endl;
}

template <typename T1, typename T2>
void roo(T1 *t1, T2 *t2) {
    std::cout << "roo 2" << std::endl;
}

template <typename T1, typename T2>
void roo(const T1 *t1, const T2 *t2) {
    std::cout << "roo 3" << std::endl;
}

template <typename T>
void roo(T t1, T t2) {
    std::cout << "roo 4" << std::endl;
}

void roo(AAA t1, BBB t2) {
    std::cout << "roo 5" << std::endl;
}

int main() {
    AAA a;
    AAA *pa;
    BBB b;
    BBB *pb;
    
    roo(a, pa);
    roo(pa, pb);
    roo((const AAA*)pa, (const BBB*)pb);
    roo(a, a);
    roo(a, b);
    
    return 0;
}
Comment 2 Alexander Pepin 2013-11-12 16:46:41 UTC
Fix failed for roo((const AAA*)pa, (const BBB*)pb);
navigates to function with "row 2"
executes function with "row 3"
Comment 3 petrk 2013-11-13 15:54:38 UTC
Additional fix in https://enum.ru.oracle.com/hg/pythia-platform/rev/c9a15185e879
Comment 4 petrk 2013-11-14 10:29:26 UTC
Please note, that the last commit is not in patch1 (third case is not fixed in patch).
Comment 5 petrk 2013-11-15 08:57:39 UTC
Postponed for patch2 because last fix caused little regression.
Comment 6 Quality Engineering 2013-11-17 02:12:32 UTC
Integrated into 'main-silver', will be available in build *201311170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5344348a5010
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Additional fix for #235462 - Wrong navigation to overloaded functions
(transplanted from c9a15185e8797a16349087deb903080a23d0c57a)
Comment 7 igor_nikiforov 2013-12-02 14:18:50 UTC
Additional fix integrated to releases:
  35085cee4554
Comment 8 Quality Engineering 2013-12-05 01:33:10 UTC
Integrated into 'releases/release74', will be available in build *201312042201* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/35085cee4554
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Additional fix for #235462 - Wrong navigation to overloaded functions
(transplanted from c9a15185e8797a16349087deb903080a23d0c57a)
(transplanted from 5ba63c3683ac12e002c2103e97cfaa18e39b70dd)
Comment 9 Alexander Pepin 2013-12-06 15:22:01 UTC
verified in OSS IDE built on 7.4 patch2 candidate