8sa1-gcc/gcc/testsuite/g++.old-deja/g++.mike/dyncast6.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

13 lines
177 B
C

#include <typeinfo>
class A {
public:
virtual void j () {}
};
class B : public A { };
void x (A& a) {
const B& b1 = dynamic_cast<B&>((const A&)a); // ERROR - opps
}