Commit ee655db
Fix ignored var ty ordering in relate_ty_ty
relate_ty_ty was ignoring the order in which the var and ty were passed
in when matching a var and a ty. This mean't if the var was passed in
second, the variance would be incorrectly inverted because the
parameters were swapped around.
We fixed this by inverting the variance if the var is on the right side,
and added a test case for the issue.
We also had to switch the order we pass the value + generalized value
into relate_ty_ty, since the previous incorrect ordering was hidden by
the bug.
Co-authored-by: David Ross <daboross@daboross.net>1 parent 7fc9755 commit ee655db
2 files changed
+56
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
161 | | - | |
162 | | - | |
163 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
164 | 177 | | |
| 178 | + | |
165 | 179 | | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
169 | 183 | | |
170 | 184 | | |
171 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
172 | 188 | | |
173 | 189 | | |
174 | 190 | | |
| |||
799 | 815 | | |
800 | 816 | | |
801 | 817 | | |
802 | | - | |
| 818 | + | |
803 | 819 | | |
804 | 820 | | |
805 | 821 | | |
| |||
1026 | 1042 | | |
1027 | 1043 | | |
1028 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
1029 | 1047 | | |
1030 | 1048 | | |
1031 | 1049 | | |
| |||
1049 | 1067 | | |
1050 | 1068 | | |
1051 | 1069 | | |
| 1070 | + | |
1052 | 1071 | | |
1053 | 1072 | | |
1054 | 1073 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
172 | 204 | | |
173 | 205 | | |
174 | 206 | | |
| |||
0 commit comments