Closed Bug 1004621 Opened 11 years ago Closed 9 years ago

Overrides query not working if base class method implementation has textual difference in arg list

Categories

(Webtools Graveyard :: DXR, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlmarr53, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

2.23 KB, text/x-python-script
Details
Attached file test_overrides2.py (obsolete) —
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release) Build ID: 20140421221237 Steps to reproduce: +overrides query of base class method in which the enclosing namespace qualifier is omitted due to a "using namespace" directive. I.e. the following fails if the text "Foo::" is omitted from the implementation even though the type is Foo::Bar *. +overridden:"Derived::foo(Foo::Bar *)" => 'void Base::<b>foo</b>(Foo::Bar *)' Actual results: Found that if the base class implementation has a textual difference vs the declaration due to use of a using statement then the override will not be noted by the system. I.e. this case: namespace Foo { class Bar; } using namespace Foo; class Base { virtual void foo(Bar *); }; This fails: +overridden:"Derived::foo(Foo::Bar *)" => 'void Base::<b>foo</b>(Foo::Bar *)' Expected results: Test case above should have passed. See test case in which three tests have base classes with methods that take a class pointer. First two tests pass, but third fails (presumably) due to textual mismatch of the argument list. The type of the argument is correct, but the "using namespace Foo;" statement enables the Foo:: qualifier to be omitted in the implementation.
OS: All → Linux
Hardware: All → x86_64
Attached file test_overrides3.py
Looks like the updated version works now (I only changed the import and removed 'class' identifiers in the SingleOverrideTestsWithArgs tests (they're not used anymore))- fixed by https://github.com/mozilla/dxr/pull/530 I'm guessing, if not something earlier. Thanks for the nice testcases!
Attachment #8416021 - Attachment is obsolete: true
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(Nope, fixed by something earlier than PR 530, I don't know what.)
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: