Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
inherit
/
error2.C
blob: a19c48fc1f948f11a54d5be8db160d9406d3886e [
file
] [
log
] [
blame
]
// PR c++/28259
// { dg-do compile }
struct
A
{
virtual
A
*
foo
();
// { dg-message "overridden" }
};
struct
B
:
virtual
A
;
// { dg-error "before" }
struct
C
:
A
{
virtual
B
*
foo
();
// { dg-error "invalid covariant" }
};
B
*
C
::
foo
()
{
return
0
;
}