Community
Participate
Working Groups
class A { public: void method(A); }; class B : public A { public: void method(B); using A::method; }; class C : public B { }; void test() { B b; C c; c.method(b); // 'method' is unresolved } The error message is: 'method' is ambiguous ' Candidates are: void method(B) void method(A) '
Created attachment 202581 [details] Proposed fix and test case Markus, could you please review the fix. The existing code for detecting lookup ambiguity is not correct, but I'm not sure if the proposed one is.
Comment on attachment 202581 [details] Proposed fix and test case The approach looks correct to me. There is a bug in the method collectResult(): The method ArrayUtil.addAll() expects all trailing entries to be null (not just a single one).
(In reply to comment #2) > The approach looks correct to me. There is a bug in the method collectResult(): > The method ArrayUtil.addAll() expects all trailing entries to be null (not just > a single one). There is no bug. I've clarified javadoc in ArrayUtil.
Fixed in master and cdt_8_0 > 20110901.
*** cdt git genie on behalf of Sergey Prigogin *** Bug 356268 - Name resolution problem with 'using' declaration inside a class. Fix and test case. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=e6d138a358e1eca344b5285c89f4ffbbca551b08
*** cdt git genie on behalf of Sergey Prigogin *** Bug 356268 - Name resolution problem with 'using' declaration inside a class. Fix and test case. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=617866d758a80b556654f15901938e06085a7f15