E4014#
Type Mismatch.
Erroneous Example#
///|
fn[X, Y] fst(a : X, b : Y) -> X {
b
}
The above example returns a value b of type Y on line 2,
which is not the same as the return type X of the function.
Suggestion#
Please make sure to return a value of the same type as the return type of the function.
For instance, in the example above, you may write:
///|
pub fn[X, Y] fst(a : X, _b : Y) -> X {
a
}