blob: 3e392fda84ff3ba139e7c1eab8063655b964c838 [file] [log] [blame]
David Greene5f9f9ba2009-05-14 22:38:31 +00001// RUN: tblgen %s | grep {}
2
3class List<list<string> n> {
4 list<string> names = n;
5}
6
7class CAR<string e> {
8 string element = e;
9}
10
11class CDR<list<string> r, int n> {
12 list<string> rest = r;
13 int null = n;
14}
15
16class NameList<list<string> Names> :
17 List<Names>, CAR<!car(Names)>, CDR<!cdr(Names), !null(!cdr(Names))>;
18
19def Three : NameList<["Tom", "Dick", "Harry"]>;
20
21def One : NameList<["Jeffrey Sinclair"]>;