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

Make Module explode if you try to modify it after it's elaborated #1350

Closed
whitequark opened this issue May 7, 2024 · 0 comments · Fixed by #1352
Closed

Make Module explode if you try to modify it after it's elaborated #1350

whitequark opened this issue May 7, 2024 · 0 comments · Fixed by #1352

Comments

@whitequark
Copy link
Member

This protects against a beginner mistake where m is assigned to e.g. an attribute and used out of scope. Elaboration should consume the module and make it immutable.

wanda-phi added a commit to wanda-phi/amaranth that referenced this issue May 7, 2024
wanda-phi added a commit to wanda-phi/amaranth that referenced this issue May 8, 2024
This renames the `FrozenMemory` exception to `AlreadyElaborated`
and reuses it for modules.

Fixes amaranth-lang#1350.
wanda-phi added a commit to wanda-phi/amaranth that referenced this issue May 9, 2024
This renames the `FrozenMemory` exception to `AlreadyElaborated`
and reuses it for modules.

Fixes amaranth-lang#1350.
github-merge-queue bot pushed a commit that referenced this issue May 18, 2024
This renames the `FrozenMemory` exception to `AlreadyElaborated`
and reuses it for modules.

Fixes #1350.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant