-
Notifications
You must be signed in to change notification settings - Fork 477
Open
Description
// External binding to global "test"
@val external _test: (string, (unit => unit) => unit) => unit = "test"
// Wrapper function shadows the external's target name
let test = (name, callback) => {
_test(name, _done => callback())
}
// BUG: This should call global test(), but calls local wrapper instead
let broken = () => {
_test("async", done => done())
}Generates:
// Generated by ReScript, PLEASE EDIT WITH CARE
function test(name, callback) {
globalThis.test(name, _done => callback());
}
function broken() {
test("async", done => done());
}
export {
test,
broken,
}
/* No side effect */Metadata
Metadata
Assignees
Labels
No labels