Commit e804d01
Fix a small bug in assignability checking
Summary: Fixes a bug where we didn't take readonly-ness into account. Also fixes a comment that described the assignability relationship backwards. Confusingly, the spec and the conformance tests flip the names they use for the "got" and "want" TypedDicts when describing the relationship (i.e., the spec says B is assignable to A if <blah>, whereas the conformance tests say A is assignable to B if <blah>), which may be why we got this wrong.
Reviewed By: samwgoldman
Differential Revision: D78776806
fbshipit-source-id: 12345d101adbbc57979acb4aa455a359736974711 parent 511b59b commit e804d01
5 files changed
Lines changed: 28 additions & 23 deletions
File tree
- conformance/third_party
- pyrefly/lib
- solver
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10087 | 10087 | | |
10088 | 10088 | | |
10089 | 10089 | | |
10090 | | - | |
10091 | | - | |
10092 | | - | |
10093 | | - | |
10094 | | - | |
10095 | | - | |
10096 | | - | |
10097 | | - | |
10098 | | - | |
10099 | | - | |
10100 | 10090 | | |
10101 | 10091 | | |
10102 | 10092 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
474 | | - | |
475 | | - | |
| 473 | + | |
476 | 474 | | |
477 | 475 | | |
478 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
744 | | - | |
| 743 | + | |
| 744 | + | |
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
760 | | - | |
761 | | - | |
762 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
763 | 767 | | |
764 | 768 | | |
765 | 769 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
0 commit comments