Commit b27932e
committed
widenUnion now also widens Singletons
This relieves some of the load of `join` and offers more opportunities
to improve union types by constraining further. Without this step
we might lose some improvements compared to the situation before
where we always widened singletons in OrTypes. I don't have a test
case that demonstrates the difference, though.1 parent eed8f2d commit b27932e
File tree
3 files changed
+14
-11
lines changed- compiler/src/dotty/tools/dotc
- core
- typer
3 files changed
+14
-11
lines changedLines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | 279 | | |
281 | 280 | | |
282 | 281 | | |
| 282 | + | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | | - | |
| 1036 | + | |
| 1037 | + | |
1037 | 1038 | | |
1038 | 1039 | | |
1039 | 1040 | | |
| |||
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
1049 | | - | |
| 1050 | + | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | 1053 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1326 | 1326 | | |
1327 | 1327 | | |
1328 | 1328 | | |
1329 | | - | |
| 1329 | + | |
1330 | 1330 | | |
1331 | 1331 | | |
1332 | 1332 | | |
| |||
0 commit comments