aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/virtual4.C
blob: 8a44ee14135d96b20a4c018b2acd0064368c57d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Build don't link:

class A {
public:
  virtual int foo() = 0; // ERROR - original definition
};

class B {
public:
    virtual double foo() = 0;
};

class C
  : public A, public B
{
public:
  virtual double foo() { return 2; } // ERROR - conflicting return type
};

class D
  : public B, public A
{
public:
  virtual double foo() { return 2; } // ERROR - conflicting return type
};