Commit 9cba8f5
committed
Fix Expr.{unlift, unliftOrError} and add missing Unliftables
* Fix `unlift` to recive the most precise `Unliftable`.
Previously we could not add `Unliftable[List[T]]` because the implicit search
would fail with an ambigouity between `Unliftable[List[T]]` and `Unliftable[List[T]]`.
this came from the `U >: T` bound that was added to workarround the covariant `T`.
As extension methods we can simply have the same `T` for the expression type and the
unliftable type. This way, we also find the most precise `T`/`Unliftable[T]` available.
* Add unliftable for `Nil`/`List`
* Add unliftable for `None`/`Some`
* Add unliftable for `Map`
* Add unliftable for `Set`
* Add unliftable for `Left`/`Right`
* Add unliftable for `EmptyTuple`
* Support `->` in `Tuple2`1 parent b8825a2 commit 9cba8f5
File tree
6 files changed
+352
-80
lines changed- library/src-bootstrapped/scala/quoted
- tests
- neg-macros/inline-macro-staged-interpreter
- run-macros/inline-macro-staged-interpreter
- run-staging
6 files changed
+352
-80
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 16 | | |
33 | 17 | | |
34 | 18 | | |
| |||
61 | 45 | | |
62 | 46 | | |
63 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
0 commit comments