diff options
Diffstat (limited to 'test/TableGen/SuperSubclassSameName.td')
-rw-r--r-- | test/TableGen/SuperSubclassSameName.td | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/TableGen/SuperSubclassSameName.td b/test/TableGen/SuperSubclassSameName.td new file mode 100644 index 0000000..087df87 --- /dev/null +++ b/test/TableGen/SuperSubclassSameName.td @@ -0,0 +1,20 @@ +// RUN: tblgen < %s +// Test for template arguments that have the same name as superclass template +// arguments. + + +class Arg { int a; } +def TheArg : Arg { let a = 1; } + + +class Super<Arg F> { + int X = F.a; +} +class Sub<Arg F> : Super<F>; +def inst : Sub<TheArg>; + + +class Super2<int F> { + int X = F; +} +class Sub2<int F> : Super2<F>; |