Bug 75883

Summary: Names resolving: using directives, using declarations and namespace aliases should be taken into account
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: -- Other --Assignee: Vladimir Kvashin <vkvashin>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P1 CC:
Version: 5.x   
Target Milestone: TBD   
Hardware: All   
OS: All   
Whiteboard: CND-Preview-2
Issue Type: DEFECT Exception Report:
Bug Depends on:    
Bug Blocks: 76153    

Description Vladimir Kvashin 2006-05-03 20:40:29 UTC
Names resolving: using directives, using declarations and namespace aliases in
the current file should be taken into account.

In particular, the following code shouldn't contain unresolved references.


#include <stdlib.h>

namespace A { 
	struct AA { 
		int fa; 
		void foo();
	};
	void foo();
}      
namespace C { 
	struct CC { int fc; };
}

namespace B = A;          // namespace alias

using namespace A;      // using directive
using C::CC;          // using declaration

class ZZ {
    AA a;            // a is of type A::AA
    B::AA b;   //  b is of type A::AA
    CC c;      // c is of type C::CC
};

void B::foo() {
}

void B::AA::foo() {
}

int
main(int argc, char** argv) {
    
    return (EXIT_SUCCESS);
}


To verify  this, one may use tracemodel.sh script, which is located in the root
of modelimpl module. Consider that code above resides in file.cpp. Change
current directory into cnd/modelimpl. 

tracemodel -m file.cpp

Now there are several lines that contain "unresolved::" in output.
There shouldn't be such lines.
Comment 1 Vladimir Kvashin 2006-05-10 13:44:03 UTC
Now the example listed in this IZ doesn't have unresolver variables. 
Other issued related with resolver are subjects of a separate IZ (that should
refer the task #76153)
Comment 2 Maria Tishkova 2007-10-31 16:15:02 UTC
it is verified, 

in Editor goto declaration doesn't work for namespace alias B
which means it doesn't work  for any of constructions started with B::
but it looks like this issue is described as a TASK which has state NEW (IZ #76153)
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo