silver icon indicating copy to clipboard operation
silver copied to clipboard

File-scope import can cause some missing equations to be missed by flow analysis

Open krame505 opened this issue 4 years ago • 1 comments

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.

krame505 avatar Nov 30 '20 18:11 krame505

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.

tedinski avatar Dec 01 '20 00:12 tedinski