Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if m.If(...): is silently dropped #284

Closed
nmigen-issue-migration opened this issue Dec 23, 2019 · 0 comments
Closed

if m.If(...): is silently dropped #284

nmigen-issue-migration opened this issue Dec 23, 2019 · 0 comments
Milestone

Comments

@nmigen-issue-migration
Copy link

Issue by Stary2001
Monday Dec 23, 2019 at 07:50 GMT
Originally opened as m-labs/nmigen#284


In some nMigen code I had if m.If(...) as a typo of with m.If(...): - this gets silently dropped.

<whitequark> Stary: the problem is that you're doing `if m.If():`
<whitequark> it should be `with m.If():`
<whitequark> `m.If()` itself just returns `None`, so the whole conditional is just ignored
<whitequark> I consider this a usability bug; please report an issue so I can make sure no one ever gets confused by this again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant