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