Commit ad95e58
authored
Fix issue with certain polyfunctions not properly matching in macros (#23614)
Fixes #23589
previously the contents of TypeBoundsTree were directly compared with
the types of defn.Nothing and defn.Any, which caused an issue where:
* `def.Nothing.tpe` equals `TypeRef(ThisType(TypeRef(NoPrefix,module
class scala)),class Nothing)`
* while the analogous type unpicked from quoted code was
`TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object
scala),Nothing)`
Same situation with the upper type bound `Any`. `isAny` and
`isNothingType` accept both types, so they are now used instead.File tree
3 files changed
+16
-2
lines changed- compiler/src/scala/quoted/runtime/impl
- tests/pos-macros/i23589
3 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
| 463 | + | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
| 466 | + | |
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments