E4014

E4014#

Type Mismatch.

Erroneous Example#

fn fst[X, Y] (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:

fn fst[X, Y] (a: X, b: Y) -> X {
  a
}