-
Notifications
You must be signed in to change notification settings - Fork 473
Closed
Description
type student = {
name: string;
age: int;
}
let _ =
match (Some 1) with
| Some 1 ->
match [%raw "1"] with
| 1 -> {name = "hi"; age = 1}
| 2 -> {
name = "bye";
age = Js.Math.floor 1.
}In the new compiler version, this generates a JS syntax error.
var match = 1;
if (match !== undefined) {
if (match !== 1) {
throw [
Caml_builtin_exceptions.match_failure,
/* tuple */[
"Index.ml",
387,
0
]
];
}
var match$1 = (1);
if (match$1 !== 1) {
if (match$1 !== 2) {
throw [
Caml_builtin_exceptions.match_failure,
/* tuple */[
"Index.ml",
389,
2
]
];
}
// here!
{
name: "bye",
age: Js_math.floor(1)
};
}
} else {
throw [
Caml_builtin_exceptions.match_failure,
/* tuple */[
"Index.ml",
387,
0
]
];
}Metadata
Metadata
Assignees
Labels
No labels