dwango / fialyzer

[WIP] Faster Implementation of Dialyzer
https://dwango.github.io/fialyzer/
Apache License 2.0
56 stars 8 forks source link

Bug: solving for any case #175

Closed yoshihiro503 closed 5 years ago

yoshihiro503 commented 5 years ago
f(X) ->
    case X of
        ok -> 0;
        _ -> 1
    end.

main() ->
    f(true).

The type of the function f/1 should be any() -> number(), but it does not. So this code gets a type error.

TODO:filename:-1: Type error: type mismatch;
  found   : 'true'
  required: 'ok'
yoshihiro503 commented 5 years ago

This is a bug of the solving algorithm. solve_disj [(X <: 'ok'); (X <: any())] should be {X |-> any()}, but it is {X |-> 'ok'}.