Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ad-hoc handling of is_float/is_integer guards
Summary: In the very specific case ```Erlang foo(I) when is_integer(I) -> ... foo(F) when is_float(F) -> ... ``` ignore negative type info issued from the former clause in occurrence typing, so as to avoid a falsely empty type in the latter. The logic is based around comparing the current guard with the following ones, if it is of the form `is_integer` or `is_float` and the dual is present after, then the negative info is ignored. This negative info will however be kept after the second guard, so as to still properly refine number types. This needs some comparison of variables, so the code had to be refactored to keep the alias maps available for every clause. Reviewed By: ilya-klyuchnikov Differential Revision: D59518988 fbshipit-source-id: 7af4233d48ea0b8c28b2a4c79fc381cec9c6ed87
- Loading branch information