1 // RUN: llvm-tblgen %s | FileCheck %s
4 // CHECK: --- Classes ---
5 // CHECK: list<int> ret = !foreach(a,
10 // CHECK: list<list<int>> ret = {{\[}}[1, 2, 3], [1, 2, 3]];
13 // The variable name 'a' is used both in the "inner" and in the "outer" foreach.
14 // The test ensure that the inner declaration of 'a' properly shadows the outer
16 class A<list<int> lst> {
17 list<int> ret = !foreach(a, lst, !add(a, 1));
20 class B<list<int> lst1, list<int> lst2> {
21 list<list<int>> ret = !foreach(a, lst1, A<lst2>.ret);
24 class C<list<int> lst2> {
25 list<list<int>> ret = B<[0, 1], lst2>.ret;
28 def C0 : C<[0, 1, 2]>;