Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New inference: overloaded idx
Summary: There is a subtle issue with the type-checking of `idx`. After constructing the signature for `idx`, according to the number of parameters, and checking the call, we try to eliminate double nullables using a call to `non_null`. This shouldn't be necessary (subtyping etc should just deal with it) but in the absence of this code we trigger various weirdnesses related to growing of unresolveds etc. (See new test `idx_bug.php` for an example.) Under `--new-inference` we don't trigger these problems (it seems to deal with double nullables better) but instead there is an interaction with variance of type variables, caused by the eager solving of type variables in `non_null` (see test `idx_test.php`). So for now, we avoid calling `non_null` only when `--new-inference` is set. Once we move to the new algorithm, we should just remove the code completely. Reviewed By: manzyuk Differential Revision: D13720874 fbshipit-source-id: 7d99174516295f23fa5b915034f931c84f5084ab
- Loading branch information
Showing with 35 additions and 1 deletion.