Skip to content

eqWAlizer: any_fun_type:fun_to_f4_neg/1 #3

@albsch

Description

@albsch

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')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions