dwango / fialyzer

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

Fill the gap to treat `t_sup` and `t_inf` for `bitstr` between Dialyzer and Fialyzer #281

Open yuezato opened 5 years ago

yuezato commented 5 years ago

The current version of Fialyzer does not implement the following parts: https://github.com/erlang/otp/blob/OTP-22.0.7/lib/hipe/cerl/erl_types.erl#L2567-L2568 https://github.com/erlang/otp/blob/OTP-22.0.7/lib/hipe/cerl/erl_types.erl#L2876-L2889

Therefore, for example, the current implementation rejects the following, which is accepted by Dialyzer:

-module(binary_test).
-export([main/1]).

main(X) ->
    _ = binary_to_integer(X), %% binary -> integer.
    _ = bit_size(X). %% bitstring -> integer >= 0.