You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
External refinements are not applied to packages checked before the spec's package #416
An @ExternalRefinementsFor spec is ignored when the code that uses the class is in a package that is checked before the spec's own package: its parent package, or a sibling that comes earlier. A call that violates the spec then passes verification silently.
Verifying the directory gives Correct! Passed Verification. (checked with 0.0.35 and main).
Spec in
Client in
Result
sub
unnamed package (same directory, or spec in sub/)
passes
sub
sibling app
passes
aspec
sibling zclient
Refinement Error
sub
sub or sub.inner
Refinement Error
unnamed package
unnamed package or app
Refinement Error
Cause
RefinementProcessor.processPackage registers a package's external specs, checks that package's types, and only then recurses into its sub-packages. A spec is therefore unknown while every package checked before its own is verified.
Possible fix
Register the external specs (and the other first-pass information) of the whole package tree before checking any package's types.
Impact
Found while running the Barista benchmark specs (package expert.<class>;) against exercises in the unnamed package: every violation passed until the spec's package line was removed.
Activity