melt-umn / silver

An attribute grammar-based programming language for composable language extensions
http://melt.cs.umn.edu/silver/
GNU Lesser General Public License v3.0
58 stars 7 forks source link

Dependencies from default productions aren't included in flow type inference #820

Open krame505 opened 9 months ago

krame505 commented 9 months ago

For example

inherited attribute inh::Integer occurs on Foo;
inherited attribute syn::Integer occurs on Foo;
aspect default production
top::Foo ::=
{ top.syn = top.inh; }

If there are no other equations for syn, this will flag the default equation as exceeding the flow type of syn. As a workaround, one can explicitly specify flowtype syn {inh} on Foo;.