Compiler crashes when a module is named Js
It crashes with Not_found error.
To reproduce,
module Js = {
let f = () => 1
}
let x = Js.f()
Playground, https://rescript-lang.org/try?version=v11.1.3&code=LYewJgrgNgpgBAKQM5wLxwN4Cg51gFzgDM04AKASjQD44BGLAXyywLgA9TkA6IyrIA
Instead of crashing, we should probably throw a better error that a module can't be named Js or something (since we already have Js module).
a module can't be named Js or something (since we already have Js module).
Can't we...?
a module can't be named Js or something (since we already have Js module).
Can't we...?
If I have a module named Map inside a module named A, doing open A will throw a warning that Map shadows the Map from Core. Maybe we should follow the same behavior?
If I have a module named Map inside a module named A, doing open A will throw a warning that Map shadows the Map from Core. Maybe we should follow the same behavior?
Yes, I think so. And it should allow users to have their own Js bindings with/without opening Core in the future releases.
This is fixed in V12.