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)
committerwhitequark <whitequark@whitequark.org>
Thu, 22 Oct 2020 13:23:06 +0000 (13:23 +0000)
commit9d62cbefa5894c9bce8a0025ce8ab0ae12873937
treeddf29518bd4c6f0e1002ab143a467a461ad273c3
parent2c505deacc539f1fab1af4c3028c527e4093c775
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