File tree Expand file tree Collapse file tree 3 files changed +1
-6
lines changed
library/src-bootstrapped/scala/quoted Expand file tree Collapse file tree 3 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,6 @@ trait Unliftable[T] {
14
14
15
15
object Unliftable {
16
16
17
- /** Default unliftable for Unit */
18
- given UnitUnliftable as Unliftable [Unit ] = new PrimitiveUnliftable
19
-
20
17
/** Default unliftable for Boolean */
21
18
given BooleanUnliftable as Unliftable [Boolean ] = new PrimitiveUnliftable
22
19
@@ -44,7 +41,7 @@ object Unliftable {
44
41
/** Default unliftable for String */
45
42
given StringUnliftable as Unliftable [String ] = new PrimitiveUnliftable
46
43
47
- private class PrimitiveUnliftable [T <: Unit | Null | Int | Boolean | Byte | Short | Int | Long | Float | Double | Char | String ] extends Unliftable [T ] {
44
+ private class PrimitiveUnliftable [T <: Int | Boolean | Byte | Short | Int | Long | Float | Double | Char | String ] extends Unliftable [T ] {
48
45
/** Lift a quoted primitive value `'{ n }` into `n` */
49
46
def fromExpr (x : Expr [T ]) = Const .unapply(x)
50
47
}
Original file line number Diff line number Diff line change 1
- Some(())
2
1
Some(true)
3
2
Some(1)
4
3
Some(2)
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ object Test {
6
6
given Toolbox = Toolbox .make(getClass.getClassLoader)
7
7
8
8
def main (args : Array [String ]): Unit = withQuotes {
9
- println((' {}).unlift)
10
9
println((' {true }).unlift)
11
10
println((' {1 }).unlift)
12
11
println((' {2 : Byte }).unlift)
You can’t perform that action at this time.
0 commit comments