contract C =
entrypoint f(x) =
let s = "str1"
let t = "str2"
let c = s + t
c
The type checker will produce the error message:
type_error: Cannot unify `string` and `int`
At: Line 3, column 13
The error message does not give any hints on why it's trying to unify a string with an int, especially that it doesn't mention line 5, where s is the left hand side of the + operator, which is expected to be an int.
In the following example contract:
The type checker will produce the error message:
The error message does not give any hints on why it's trying to unify a
string
with anint
, especially that it doesn't mention line 5, wheres
is the left hand side of the+
operator, which is expected to be an int.