This MR is a fix for an issue related to helping JsLIGO infer whether C_POLYMORPHIC_ADD
should resolve to C_CONCAT
/ C_ADD
:
The code
let s = String.sub(0 as nat, 1 as nat, "hello") + String.sub(1 as nat, 1 as nat, "hello")
will output
Invalid arguments.
Expected an argument of type (bls12_381_g1, bls12_381_g1) or (bls12_381_g2, bls12_381_g2) or (bls12_381_fr, bls12_381_fr) or (nat, nat) or (int, int) or (tez, tez) or (nat, int) or (int, nat) or (timestamp, int) or (int, timestamp), but got an argument of type string, string.
because C_POLYMORPHIC_ADD
gets resolved to C_ADD
instead of C_CONCAT
.
-
has a changelog entry