def test_match_bitwidth_with_pattern_matched_fields(self):
        i = pyrtl.Input(5, 'i')
        out = pyrtl.Output(2, 'out')

        with pyrtl.conditional_assignment:
            with pyrtl.match_bitpattern(i, '1a?a0') as (a,):
                out |= a
            with pyrtl.match_bitpattern(i, 'b0?1b') as (b,):
                out |= b
            with pyrtl.match_bitpattern(i, 'ba1ab') as (b, a):
                out |= a + b

        self.check_all_accesses_valid()