gcc/testsuite/g++.old-deja/g++.brendan/overload1.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed overloading |
| 3 | class Foo |
| 4 | { |
| 5 | public: |
| 6 | int f (void); |
| 7 | }; |
| 8 | |
| 9 | class Bar : public Foo |
| 10 | { |
| 11 | public: |
| 12 | int f (int); // { dg-message "Bar::f|candidate expects" } |
| 13 | }; |
| 14 | |
| 15 | int main () |
| 16 | { |
| 17 | Bar b; |
| 18 | |
| 19 | b.f ();// { dg-error "no matching" } |
| 20 | b.f (10); |
| 21 | } |