summaryrefslogtreecommitdiffstats
path: root/llvm/test/TableGen/cast-typeerror.td
blob: af33a01d27e8885d9a4e0d01a7e15ab34d955e2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s
// XFAIL: vg_leak

class A;
class B;

def A0 : A;

class C<string name> {
  B b = !cast<B>(name);
}

// CHECK: error: Expected type 'B', got 'A' in: !cast<B>("A0")
def Test : C<"A0">;
OpenPOWER on IntegriCloud