hdl.dsl: error on Elif immediately nested in an If.
authorwhitequark <whitequark@whitequark.org>
Thu, 22 Oct 2020 13:23:06 +0000 (13:23 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 15:15:20 +0000 (15:15 +0000)
commit45b28ac856800f13c9759aa52994f605ab4becaa
treebf8bcd7fb9989cd7207b9630ea539a6e788ced48
parent004cb03fe8f795392371cf4e26cd46d1640b4e16
hdl.dsl: error on Elif immediately nested in an If.

I.e. on this code, which is currently not only wrongly accepted but
also results in completely unexpected RTL:

    with m.If(...):
        with m.Elif(...):
            ...

Fixes #500.
nmigen/hdl/dsl.py
tests/test_hdl_dsl.py