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 271349 - Macro with namespace code assistance issue
Summary: Macro with namespace code assistance issue
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 17:55 UTC by clpaulino
Modified: 2017-08-23 07:52 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 clpaulino 2017-08-22 17:55:04 UTC
Product Version: NetBeans IDE 8.2 (Build 201609300101)
Java: 1.8.0_144; Java HotSpot(TM) 64-Bit Server VM 25.144-b01
Runtime: Java(TM) SE Runtime Environment 1.8.0_144-b01

Code assistance does not work when I declare variables within an inner class that is in a macro that is used for a namespace with brackets.

An example of the macro I need is this

#define MY_MACRO(Argument) \
        namespace MyNameSpace##Argument { \
        namespace AnotherNameSpace { \
           inline char const* GetArgument () { \
              return #Argument; \
           } \
        } \
     } \
     namespace MyNameSpace##Argument

I have tested without the nested namespace and only used one. As long as there are brackets associated with the namespace, the issue occurs. An example of the issue is below. The code assistance marks the variables I declare in my method as unable to resolve identifier.

MY_MACRO(Argument)
{
class MyClass
{
public:
   MyClass()
   {
   }

   void MyMethod(const int myInt) // myInt Unresolved
   {
      int newInt = myInt; // newInt and myInt are unresolved
   }
}
}