summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/cond2.C
blob: 68a26a22f34ff0e9f1ef9be06f4dbe6d198bced0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
struct Term { };
struct Boolean : Term {
  explicit Boolean(bool);
};
struct IsZero : Term {
  Term *eval();
};
Term*
IsZero::eval()
{
  return true ? new Boolean(false) : this; // { dg-error "conditional expression" }
}