Commit 0298581
authored
Fix errors in explicit type annotations in inline match cases (#16257)
Previously, Unapply trees would have type bindings generated inside
their body and this was the only case handled in InlineReducer. However,
this mainly happened for inferred type parameters, and Unapply with an
explicit binding inside a type annotation was not handled, leading to a
"cannot reduce match" error. This case is now handled and a related
comment was added as well.File tree
2 files changed
+24
-3
lines changed- compiler/src/dotty/tools/dotc/inlines
- tests/pos-macros
2 files changed
+24
-3
lines changedLines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
275 | 283 | | |
276 | | - | |
277 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
278 | 287 | | |
279 | 288 | | |
280 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments