dwango / fialyzer

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

Support Multi module #242

Closed yoshihiro503 closed 5 years ago

yoshihiro503 commented 5 years ago

fix #167

Example

-module(mod_a).

-export([f/0, h/1, main/0]).

main() ->
  h(mod_b:g(f())).

-spec f() -> ok.
f() -> ok.

-spec h(number()) -> boolean().
h(Num) ->
   (Num and true) =:= 123.
-module(mod_b).

-export([g/1]).

-spec g(ok | error) -> number().
g(X) ->
    1.
erlc +debug_info mod_a.erl
erlc +debug_info mod_b.erl
_build/default/bin/main.exe --debug mod_a.beam mod_b.beam
2019-04-11T12:11:19 (bin/main.ml:67:18) === start fialyzer ===
...
TODO:filename:-1: Type error: type mismatch;
  found   : number()
  required: 'true' | 'false'
there is no solution that satisfies subtype constraints
kmizu commented 5 years ago

LGTM