-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Should fail, but passes:
-type f4(T) :: fun((...) -> T). | |
-spec apply_f4_neg(f4(number())) -> boolea…… |
apply_f4_neg(F) -> F(a). | ERROR | F.
| | Expected fun type with arity 1
| | Got: f4(number())
Similar:
-type f4(T) :: fun((...) -> T). | |
-spec f4_to_fun_neg(f4(a)) -> fun((term())…… |
f4_to_fun_neg(F) -> F. | ERROR | F.
| | Expected: fun((term()) -> 'a' | 'b')
| | Got : f4('a')
| |
| | f4('a') is not a subtype of fun((term()) -> 'a' | 'b')
| | because
| | fun((...) -> 'a') is not a subtype of fun((term()) -> 'a' | 'b')