Check types exist in external fns
@@ -518,6 +518,11 @@ external_fn_test() ->
],
test_infer(Cases).
+invalid_external_fn_test() ->
+ {error, {unknown_type, _, _, "b", 0}} = infer("external fn go(Bool) -> b = '' ''"),
+ {error, {unknown_type, _, _, "List", 0}} = infer("external fn go(List) -> Int = '' ''"),
+ {error, {unknown_type, _, _, "List", 2}} = infer("external fn go(List(a, b)) -> Int = '' ''").
+
external_type_test() ->
Cases = [
{
