Bug 294879 - invalid use of 'using namespace' in class-scope accepted by kdevelop
Summary: invalid use of 'using namespace' in class-scope accepted by kdevelop
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-26 18:37 UTC by flo.ruijt
Modified: 2016-12-13 08:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0
Sentry Crash Report:


Attachments
The bug has already been resolved. (653.15 KB, image/png)
2016-04-17 22:29 UTC, Sumeet Tulsani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description flo.ruijt 2012-02-26 18:37:33 UTC
Version:           git master (using KDE 4.7.4) 
OS:                Linux

code such as

namespace B{}
struct A{
 using namespace B;
};

is accepted by the parser, which is rejected by gcc.
it would be nice to report to the user that this is an invalid construct.

Reproducible: Always

Steps to Reproduce:
1) enter code
2) profit!

Actual Results:  
highlighted source

Expected Results:  
red underlining and a reported problem  like "using namespace X not valid in class scope"
Comment 1 Sumeet Tulsani 2016-04-17 22:29:35 UTC
Created attachment 98436 [details]
The bug has already been resolved.

The bug has already been resolved as shown in the snapshot. I am using Ubuntu 15.10 to test the same.
Comment 2 Kevin Funk 2016-04-18 07:44:05 UTC
True, thanks for the feedback!