-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defer start of feature-dependent transformations to a later point.
We previously would evaluate whether a unit field or method was required by an optional feature before we had finished collecting all feature requirements. This behavior was fine when we were visiting individual modules' AST on by one, but breaks with #1462 were we changed using a single AST to hold all modules. This patch defers transformations until all feature requirements have been collected.
- Loading branch information
Showing
2 changed files
with
29 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# @TEST-DOC: Checks that the order in which modules are compiled is irrelevant for optimizations, regression test for #1789. | ||
# | ||
# @TEST-EXEC: spicyc -dj y.spicy x.spicy | ||
# @TEST-EXEC: spicyc -dj x.spicy y.spicy | ||
|
||
# @TEST-START-FILE x.spicy | ||
module x; | ||
|
||
public type X = unit { | ||
on %synced { | ||
confirm; | ||
} | ||
}; | ||
# @TEST-END-FILE | ||
|
||
# @TEST-START-FILE y.spicy | ||
module y; | ||
|
||
type Y = unit {}; | ||
# @TEST-END-FILE |