Commit 0b0dfa5
Fix occurrence typing for is_function/2
Summary:
The actual top type for a function of arity `n` is `FunType(Nil, List.fill(n)(NoneType), AnyType)`, not `FunType(Nil, List.fill(n)(AnyType), AnyType)`, which means the negation of the predicate is not properly computed.
However, due to how intersection is computed (and particularly when it involves dynamic types), using this as a top type for the positive refinement leads to confusing signal, producing `none()` as domain. So this diff only uses it for the negative part.
Reviewed By: michalmuskala
Differential Revision: D85336038
fbshipit-source-id: 663393fe5919274c945435e764132faa4b0e72211 parent 379bfd6 commit 0b0dfa5
File tree
1 file changed
+1
-45
lines changed- crates/elp/src/resources/test/eqwalizer_tests/eqwater
1 file changed
+1
-45
lines changedLines changed: 1 addition & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | 683 | | |
706 | 684 | | |
707 | 685 | | |
| |||
710 | 688 | | |
711 | 689 | | |
712 | 690 | | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
| 691 | + | |
0 commit comments