-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sempass2: lift capture restriction (#1427)
## Summary Procedures useable in both compile- and run-time contexts can now close over compile-time-only locals even if nested in another procedure usable in both contexts. Fixes #1425. ## Details Given the nested procedures `a: b: c:`, where `c` closes over a local of `a`, `c` effectively captures from `b` and `b` captures from `a`. A procedure usable in both a compile- and run-time context may capture from a compile-time-only procedure, so the aforementioned should work when `a` is a compile-time-only procedure and the others are not, since `c` can legally borrow from `b` and `b` from `a`, but it was disallowed in practice. The arbitrary restriction is now lifted, and the code implementing the test restructured to be easier to understand.
- Loading branch information
Showing
2 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters