The following term gets translated to slotted-sexpr incorrectly:
fun extern binding(n1 n2: Nat, arg: «%core.nat.mul (n1, n2); Nat»): «%core.nat.mul (n1, n2); Nat» =
let mapper = %rise.map @(%core.nat.mul (n1, n2)) f;
return (mapper arg);
The resulting sexpr creates two invalid bindings for n1 and n2 that extract from some variable that was never bound:
(root extern binding
(fun
$_41120
(scope
(lit ff Bool)
(let
$n1_41093
(scope
(extract
(var $_41092) <-------------- never bound
(lit 0 (idx (lit 3 Nat))))
(let
$n2_41094
(scope
(extract
(var $_41092) <-------------- never bound
(lit 1 (idx (lit 3 Nat))))
(let
$return_41139
(scope
(extract
(var $_41120)
(lit tt Bool))
(let
$n1_41132
(scope
(extract
(extract
(var $_41120)
(lit ff Bool))
(lit 0 (idx (lit 3 Nat))))
(let
$n2_41133
(scope
(extract
(extract
(var $_41120)
(lit ff Bool))
(lit 1 (idx (lit 3 Nat))))
...
The following term gets translated to slotted-sexpr incorrectly:
The resulting sexpr creates two invalid bindings for
n1andn2that extract from some variable that was never bound: