silver
silver copied to clipboard
File-scope import can cause some missing equations to be missed by flow analysis
For example for two files in the same grammar:
-- A.sv
nonterminal Foo;
abstract production foo
top::Foo ::=
{}
-- B.sv
import silver:langutil;
attribute pp occurs on Foo;
Here the production foo
is missing an equation for pp
, but the error doesn't get reported. If the import
was a grammar-scope imports
instead, the error shows up on the production foo
.
This is probably inaccurate suppression. That is, it used to be both occurs and production raised the errors, but we started omitting the occurs if it looks like the production should error instead.