I have this prog:
-module(a).
-export([add/2]).
-export([add2/1]).
-spec add(integer(),integer())->integer().
add(A,B)->A+B.
add2(C)->C+add(1,"a").
I can compile this prog with no error.but I think I should got error for the line
add(1,"a").
in any static type language,it can't compile,so why erlang will compile this?how to
write the type signature so erlang can catch this error?If erlang can't,can elixir write the same prog but can catch this error?Thanks!