Flow analysis confuses attributes from separate grammars when imported together
I have four grammars: common, A, B, and main. Both A and B import common, and main imports all three.
The grammar common defines several nonterminals and productions shared between A and B. Both A and B define a synthesized attribute named translation, both of which occur on these shared nonterminals. In A, the translation depends on some attributes which only occur in A. There are no flow errors in either A or B alone.
When I compile the main grammar, I get flow errors in B for accessing B's translation attribute without giving the inherited attributes necessary for A's translation attribute. It doesn't matter which grammar is imported first.
Interesting. What happens if you specify the flow types for the translation attributes explicitly? Curious if this is a bug with flow type inference or lookup.
Also, do you have a minimal example somewhere that reproduces this?
If I specify the flow types, the errors are reduced to a single error for exceeding the flow type.
I'm not having any luck creating a minimal example. My attempts thus far have not given errors.