mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
![]() Fix a bug in `dbg` expression desugaring by using the module scope to generate unique identifiers instead of the variable store. In the initial implementation of `dbg` expressions we used the `VarStore` to generate unique identifiers for new variables created during desugaring. We should have instead used the current module's `Scope`, which handles identifiers within the module. Each scope has its own incrementing variable count which is independent of the shared variable store. The scope is used to generate new identifiers at other points in canonicalization, such as when assigning a global identifier to closures and `expect`s. It's possible that the identifier generated for `dbg` could conflict with an identifier generated by the scope, resulting in a confusing error. |
||
---|---|---|
.. | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |