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.
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.