@@ -28,58 +28,58 @@ object Unliftable {
2828 * - Unlifts `'{false}` into `Some(false)`
2929 * - Otherwise unlifts to `None`
3030 */
31- given BooleanUnliftable as Unliftable [Boolean ] = new PrimitiveUnliftable
31+ given BooleanUnliftable [ T <: Boolean ] as Unliftable [T ] = new PrimitiveUnliftable
3232
3333 /** Default unliftable for Byte
3434 * - Unlifts `'{n}` into `Some(n)` for a literal `n` of type `Byte`
3535 * - Otherwise unlifts to `None`
3636 */
37- given ByteUnliftable as Unliftable [Byte ] = new PrimitiveUnliftable
37+ given ByteUnliftable [ T <: Byte ] as Unliftable [T ] = new PrimitiveUnliftable
3838
3939 /** Default unliftable for Short
4040 * - Unlifts `'{n}` into `Some(n)` for a literal `n` of type `Short`
4141 * - Otherwise unlifts to `None`
4242 */
43- given ShortUnliftable as Unliftable [Short ] = new PrimitiveUnliftable
43+ given ShortUnliftable [ T <: Short ] as Unliftable [T ] = new PrimitiveUnliftable
4444
4545 /** Default unliftable for Int
4646 * - Unlifts `'{n}` into `Some(n)` for a literal `n` of type `Int`
4747 * - Otherwise unlifts to `None`
4848 */
49- given IntUnliftable as Unliftable [Int ] = new PrimitiveUnliftable
49+ given IntUnliftable [ T <: Int ] as Unliftable [T ] = new PrimitiveUnliftable
5050
5151 /** Default unliftable for Long
5252 * - Unlifts `'{n}` into `Some(n)` for a literal `n` of type `Long`
5353 * - Otherwise unlifts to `None`
5454 */
55- given LongUnliftable as Unliftable [Long ] = new PrimitiveUnliftable
55+ given LongUnliftable [ T <: Long ] as Unliftable [T ] = new PrimitiveUnliftable
5656
5757 /** Default unliftable for Float
5858 * - Unlifts `'{n}` into `Some(n)` for a literal `n` of type `Float`
5959 * - Otherwise unlifts to `None`
6060 */
61- given FloatUnliftable as Unliftable [Float ] = new PrimitiveUnliftable
61+ given FloatUnliftable [ T <: Float ] as Unliftable [T ] = new PrimitiveUnliftable
6262
6363 /** Default unliftable for Double
6464 * - Unlifts `'{n}` into `Some(n)` for a literal `n` of type `Double`
6565 * - Otherwise unlifts to `None`
6666 */
67- given DoubleUnliftable as Unliftable [Double ] = new PrimitiveUnliftable
67+ given DoubleUnliftable [ T <: Double ] as Unliftable [T ] = new PrimitiveUnliftable
6868
6969 /** Default unliftable for Char
7070 * - Unlifts `'{c}` into `Some(c)` for a literal `c` of type `Char`
7171 * - Otherwise unlifts to `None`
7272 */
73- given CharUnliftable as Unliftable [Char ] = new PrimitiveUnliftable
73+ given CharUnliftable [ T <: Char ] as Unliftable [T ] = new PrimitiveUnliftable
7474
7575 /** Default unliftable for String
7676 * - Unlifts `'{str}` into `Some(str)` for a literal `str` of type `String`
7777 * - Otherwise unlifts to `None`
7878 */
79- given StringUnliftable as Unliftable [String ] = new PrimitiveUnliftable
79+ given StringUnliftable [ T <: String ] as Unliftable [T ] = new PrimitiveUnliftable
8080
8181 /** Lift a quoted primitive value `'{ x }` into `x` */
82- private class PrimitiveUnliftable [T <: Int | Boolean | Byte | Short | Int | Long | Float | Double | Char | String ] extends Unliftable [T ] {
82+ private class PrimitiveUnliftable [T <: Boolean | Byte | Short | Int | Long | Float | Double | Char | String ] extends Unliftable [T ] {
8383 def fromExpr (expr : Expr [T ]) =
8484 import quotes .reflect ._
8585 def rec (tree : Term ): Option [T ] = tree match {
0 commit comments