Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] bindings for CPPASTNewExpression

> > Resolving T in new T to a constructor is problematic. Consider the
> > following example:
> >
> > [snip]
> >
> > I think we should follow the option #1 despite of the fact that it may
> > break some existing code that depends on resolving "new T" to a ctor
> > call. Formally this is not an API change since IASTName.resolveBinding
> > does not make a promise of what kind of binding the name resolves to.
>
> Thanks for your advice! I'm working on implementing option #1.
>
> I filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=398706 to track
> the issue

Done, patch is at https://git.eclipse.org/r/#/c/9824/

There is one test that is still failing, IndexCPPBindingResolutionTest.
testNestedClass_284665(). The assertion "assertFalse(b2 instanceof
IIndexBinding)" is failing now that b2 is an ICPPClassType rather than
an ICPPConstructor. I'm not sure whether it's still desirable for this
assertion to be there, and if so how to fix the underlying problem.
Any chance you could take a look at it?

Thanks!
Nate
 		 	   		  

Back to the top