Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/blackbox-tests/mel-as-string-warnings.t
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,17 @@ The analog case with `@mel.int` fails to build
^^^^^^^^^^^^^^^
Error: Invalid type for `@mel.int'
[2]

This is wrong, just because there's `[@mel.as]` we shouldn't splice the payload in

$ cat > x.ml <<\EOF
> external foo : ([ `foo of int [@mel.as "bar"]]) -> string = "foo"
> let _ = foo (`foo 2)
> EOF
$ melc -ppx melppx x.ml
// Generated by Melange
'use strict';


foo("bar", 2);
Copy link
Member Author

@anmonteiro anmonteiro Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mel.as here should just have changed the argument to "bar":

foo({
  NAME: "foo",
  VAL: 2
});

/* Not a pure module */