1 // RUN: tblgen %s | FileCheck %s
3 class A<int k, bits<2> x = 1> {
9 // CHECK: Bits = { 0, 1 }
13 // CHECK: Bits = { 1, 0 }
16 // Here was the bug: X.Bits would get resolved to the default a1.Bits while
17 // resolving the first template argument. When the second template argument
18 // was processed, X would be set correctly, but Bits retained the default
20 class B<int k, A x = a1> {
22 bits<2> Bits = X.Bits;
26 // CHECK: Bits = { 0, 1 }
30 // CHECK: Bits = { 1, 0 }
34 bits<2> Bits = x.Bits;
38 // CHECK: Bits = { 0, 1 }
42 // CHECK: Bits = { 1, 0 }