If we had a single list wrapped in an interpolated string, it could sneak through type unification, which is not correct. Wrapping a variable by interpolation in a string, must force it to be a string.
9 lines
225 B
Plaintext
9 lines
225 B
Plaintext
-- main.mcl --
|
|
$name = ["a", "bb", "ccc",]
|
|
|
|
#test $name {} # must pass
|
|
test "${name}" {} # must fail
|
|
|
|
-- OUTPUT --
|
|
# err: errUnify: can't unify, invariant illogicality with equality: base kind does not match (Str != List)
|