blob: bbed8690dd5d5e0f474b921cf53a2850c23f13f1 [file] [log] [blame]
David Greene5f9f9ba2009-05-14 22:38:31 +00001// RUN: tblgen %s | grep {}
Jeffrey Yasskin32989de2010-03-20 23:08:45 +00002// XFAIL: vg_leak
David Greene5f9f9ba2009-05-14 22:38:31 +00003
4class List<list<string> n> {
5 list<string> names = n;
6}
7
8class CAR<string e> {
9 string element = e;
10}
11
12class CDR<list<string> r, int n> {
13 list<string> rest = r;
14 int null = n;
15}
16
17class NameList<list<string> Names> :
David Greene1434f662011-01-07 17:05:37 +000018 List<Names>, CAR<!head(Names)>, CDR<!tail(Names), !empty(!tail(Names))>;
David Greene5f9f9ba2009-05-14 22:38:31 +000019
20def Three : NameList<["Tom", "Dick", "Harry"]>;
21
22def One : NameList<["Jeffrey Sinclair"]>;