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 225045 - C++11 "final" keyword improperly scoped
Summary: C++11 "final" keyword improperly scoped
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.2.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
: 239778 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-18 01:20 UTC by pinbender
Modified: 2014-04-24 02:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (39.89 KB, text/plain)
2013-01-18 01:20 UTC, pinbender
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pinbender 2013-01-18 01:20:36 UTC
Product Version = NetBeans IDE 7.2.1 (Build 201210100934)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_09
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.5-b02

The code assistance appears to be treating the "final" keyword as a global keyword.  It only has meaning in the context of virtual function declarations, and is therefore valid as a variable identifier.  

For example, this code is valid, but fails to be parsed by code assistance, resulting in large, distracting red error highlights throughout the body of the function:

void my_fn(int final)
{
    printf("do stuff %d\n", final);
}

Also, you guys are awesome.  To thank you for reading this far, I have included a link to a cat in a sink:  http://25.media.tumblr.com/cf4dc256c79eb9b56bd6201b0d5ae816/tumblr_mewk0slYpb1qenqklo1_500.jpg
Comment 1 pinbender 2013-01-18 01:20:39 UTC
Created attachment 130343 [details]
IDE log
Comment 2 petrk 2014-04-18 12:04:11 UTC
*** Bug 239778 has been marked as a duplicate of this bug. ***
Comment 3 petrk 2014-04-18 14:37:08 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/06673604d8e0.

Bug still needs additional fix at least to allow navigating to such variables and methods.

BTW, the sink is great, but, unfortunately, the cat blocks the view of the sink:)
Comment 4 Quality Engineering 2014-04-20 01:23:15 UTC
Integrated into 'main-silver', will be available in build *201404200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/06673604d8e0
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #225045 - C++11 "final" keyword improperly scoped
Comment 5 Quality Engineering 2014-04-24 02:03:41 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/dc0f7afb6883
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Fixed #225045 - C++11 "final" keyword improperly scoped
(transplanted from 06673604d8e0e0fd6339c2872aa7991049ac0cb4)