| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fdump-ada-spec" } */ |
| 3 |
|
| 4 |
class Root { |
| 5 |
public: |
| 6 |
virtual void copyFrom(const Root& property) = 0; |
| 7 |
}; |
| 8 |
|
| 9 |
class DT : Root { |
| 10 |
virtual void copyFrom (const Root& property); |
| 11 |
/* Although in C++ the type of argument Root is the parent type |
| 12 |
"Root", in order to properly override this primitive in Ada |
| 13 |
the profile of the generated function must be the derived |
| 14 |
type "DT" */ |
| 15 |
}; |
| 16 |
|
| 17 |
/* { dg-final { scan-ada-spec "Root'Class" } } */ |
| 18 |
/* { dg-final { cleanup-ada-spec } } */ |