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
57 stars 7 forks source link

Fix bug with uniqueness analysis for let bindings #795

Closed krame505 closed 11 months ago

krame505 commented 1 year ago

Changes

Fix handling of let bindings in the uniqueness analysis. The unique references for a lexical local reference should be just the unique references of the binding. I think the way I wrote it previously was an attempt at getting better error messages, but this had unintended consiquences when looking up all the unique references to a particular child/local that was referenced in a let binding.

Documentation

Added a comment. This is just a bug fix.

Testing

This fixes a bug that was causing some error messages to report the wrong location for a unique error message. Not worth trying to extract into a seperate regression test IMO.