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 246755 - Wrong code completion on template parameter
Summary: Wrong code completion on template parameter
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.0
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-28 14:59 UTC by Alexander Simon
Modified: 2017-04-21 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch for first problem (1.32 KB, patch)
2014-08-28 15:03 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2014-08-28 14:59:24 UTC
C++ code:

class A;

template<typename T> class Visitor {

    void VisitCallExpr(A *CE) {
        return static_cast<T*> (this)->VisitExpr(CE);
    }
};

int main(int argc, char** argv) {

    return 0;
}

Problems:
1. Hyper link from "VisitExpr" go to beginning of file
2. Completion is available inside "VisitExpr" with empty element.
If completion is applied, the result is wild:
VisitTemplateBasedReferencedObjectResultItem for lastType=Visitor::T*, textAfterType=Expr
Comment 1 Alexander Simon 2014-08-28 15:03:45 UTC
Created attachment 148940 [details]
proposed patch for first problem
Comment 2 Alexander Simon 2017-04-03 16:18:44 UTC
fixed in enum, branch release82, changeset 4955ec95dd1d
Comment 3 Quality Engineering 2017-04-11 01:53:52 UTC
Integrated into 'main-silver', will be available in build *201704110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/01e9abb170a9
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #246755 Wrong code completion on template parameter
(transplanted from 4955ec95dd1dacc2fe20491adb2ef5f09a813141)
Comment 4 ilia 2017-04-13 11:06:51 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=246755 Changesets:
    http://hg.netbeans.org/releases/rev/4955ec95dd1d # fixed Bug #246755 Wrong code completion on template parameter
Comment 5 Alexander Pepin 2017-04-21 18:02:27 UTC
Verified in in netbeans-8.2-20170421.