Skip to content

Commit

Permalink
wip: pick_value
Browse files Browse the repository at this point in the history
  • Loading branch information
erszcz committed Feb 1, 2023
1 parent 2d00b33 commit 82cbacc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/gradualizer_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,13 @@ pick_value(?type(binary, _), _Env) ->
%% The ?type(range) is a different case because the type range
%% ..information is not encoded as an abstract_type()
%% i.e. {type, Anno, range, [{integer, Anno2, Low}, {integer, Anno3, High}]}
pick_value(?type(range, [{_TagLo, _, neg_inf}, Hi = {_TagHi, _, _Hi}]), _Env) ->
%% pick_value(Hi, Env);
Hi;
pick_value(?type(range, [{_TagLo, _, neg_inf}, Hi = {TagHi, _, HiArg}]), _Env) ->
case {TagHi, Hi} of
{integer, pos_inf} ->
{atom, erl_anno:new(0), pos_inf};
_ ->
Hi
end;
pick_value(?type(range, [Lo = {_TagLo, _, _Lo}, {_TagHi, _, _Hi}]), _Env) ->
%% pick_value(Lo, Env).
Lo;
Expand Down

0 comments on commit 82cbacc

Please sign in to comment.