fram-lang / fram-lang/dbl

Selection from a module (`M.x`) as syntactic sugar (`open M in x`) might be counter-intuitive

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
0. parsing
Dominant language
OCaml
Stars
45
Forks
28
PR merge metrics
No merged PRs in 30d

Description

This syntactic sugar allows to select variables that are not publicly available in the module, but defined in other opened modules. This might lead to very counter-intuitive behavior, when variable is defined as private, as in the following code:
```
module M
let x = 42
end
let x = 13
let y = M.x
```
Current implementation raises no errors and assigns 13 to `y`.

This issue was originally reported by @kwasielewski

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.