Commit 693b818
committed
Patch implementation of
* Make sure the extrators does not match classes. This should be done using reflection.
* Do not match `'{null}` to avoid accidental NPEs.
* Do not match `'{}` as there is no value to extract.
```diff
- case Const(null) =>
+ case '{null} =>
- case Const(()) =>
+ case '{} =>
```
We specialize use the old, faster, implemtation for `Unliftable` as there it it correct by construction of the available `Unliftable`s.Const.unapply
1 parent 8a3f063 commit 693b818
File tree
3 files changed
+17
-3
lines changed- library
- src-bootstrapped/scala/quoted
- src/scala/quoted
- tests/run-macros/tasty-extractors-constants-1
3 files changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments