-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: reproduce playground not returning alerts (#878)
- Loading branch information
1 parent
eb14f05
commit e3bb75b
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
$ cat > input.js <<EOF | ||
> require(process.env.DUNE_SOURCEROOT + '/_build/default/bin/jsoo_main.bc.js'); | ||
> require(process.env.DUNE_SOURCEROOT + '/_build/default/bin/melange-cmijs.js'); | ||
> console.log(ocaml.compileRE('external foo: (([@mel.uncurry] (unit => unit)) => [@mel.uncurry] (unit => unit)) => unit = "Array.from"')); | ||
> EOF | ||
|
||
$ node input.js | ||
File "_none_", line 1, characters 18-29: | ||
Alert unused: Unused attribute [@mel.uncurry] | ||
This means such annotation is not annotated properly. | ||
For example, some annotations are only meaningful in externals | ||
|
||
|
||
File "_none_", line 1, characters 52-63: | ||
Alert unused: Unused attribute [@mel.uncurry] | ||
This means such annotation is not annotated properly. | ||
For example, some annotations are only meaningful in externals | ||
|
||
{ | ||
js_code: '// Generated by Melange\n' + | ||
"/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */\n", | ||
warnings: [], | ||
type_hints: [ | ||
{ start: [Object], end: [Object], kind: 'core_type', hint: 'unit' }, | ||
{ start: [Object], end: [Object], kind: 'core_type', hint: 'unit' }, | ||
{ start: [Object], end: [Object], kind: 'core_type', hint: 'unit' }, | ||
{ | ||
start: [Object], | ||
end: [Object], | ||
kind: 'core_type', | ||
hint: 'unit -> unit' | ||
}, | ||
{ start: [Object], end: [Object], kind: 'core_type', hint: 'unit' }, | ||
{ start: [Object], end: [Object], kind: 'core_type', hint: 'unit' }, | ||
{ | ||
start: [Object], | ||
end: [Object], | ||
kind: 'core_type', | ||
hint: 'unit -> unit' | ||
}, | ||
{ | ||
start: [Object], | ||
end: [Object], | ||
kind: 'core_type', | ||
hint: '(unit -> unit) -> unit -> unit' | ||
}, | ||
{ | ||
start: [Object], | ||
end: [Object], | ||
kind: 'core_type', | ||
hint: '((unit -> unit) -> unit -> unit) -> unit' | ||
} | ||
] | ||
} |