Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test(self):

# Test call to method in base class (this should always work as the base
# class method is never an override).
self.expect("expr b->foo()")
self.expect("expr b->foo()", substrs=["2"])

# Test call to overridden method in derived class (this will fail if the
# overrides table is not correctly set up, as Derived::foo will be assigned
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class Base {
public:
virtual ~Base() {}
virtual void foo() {}
virtual int foo() { return 1; }
};

class Derived : public Base {
public:
virtual void foo() {}
virtual int foo() { return 2; }
};

int main() {
Expand Down