File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
compiler/src/dotty/tools/dotc/transform
library/src-bootstrapped/scala/quoted Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,9 @@ class ReifyQuotes extends MacroTransform {
209209 }
210210
211211 def liftedValue [T ](value : T , name : TermName ) =
212- ref(defn.LiftableModule ).select(name).select(" toExpr" .toTermName).appliedTo(Literal (Constant (value)))
212+ ref(defn.LiftableModule )
213+ .select(name).appliedToType(originalTp)
214+ .select(" toExpr" .toTermName).appliedTo(Literal (Constant (value)))
213215
214216 def pickleAsValue [T ](value : T ) = {
215217 value match {
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ trait Liftable[T] {
1919 */
2020object Liftable {
2121
22- given Liftable_Boolean_delegate as Liftable [Boolean ] = new PrimitiveLiftable
23- given Liftable_Byte_delegate as Liftable [Byte ] = new PrimitiveLiftable
24- given Liftable_Short_delegate as Liftable [Short ] = new PrimitiveLiftable
25- given Liftable_Int_delegate as Liftable [Int ] = new PrimitiveLiftable
26- given Liftable_Long_delegate as Liftable [Long ] = new PrimitiveLiftable
27- given Liftable_Float_delegate as Liftable [Float ] = new PrimitiveLiftable
28- given Liftable_Double_delegate as Liftable [Double ] = new PrimitiveLiftable
29- given Liftable_Char_delegate as Liftable [Char ] = new PrimitiveLiftable
30- given Liftable_String_delegate as Liftable [String ] = new PrimitiveLiftable
22+ given Liftable_Boolean_delegate [ T <: Boolean ] as Liftable [T ] = new PrimitiveLiftable
23+ given Liftable_Byte_delegate [ T <: Byte ] as Liftable [T ] = new PrimitiveLiftable
24+ given Liftable_Short_delegate [ T <: Short ] as Liftable [T ] = new PrimitiveLiftable
25+ given Liftable_Int_delegate [ T <: Int ] as Liftable [T ] = new PrimitiveLiftable
26+ given Liftable_Long_delegate [ T <: Long ] as Liftable [T ] = new PrimitiveLiftable
27+ given Liftable_Float_delegate [ T <: Float ] as Liftable [T ] = new PrimitiveLiftable
28+ given Liftable_Double_delegate [ T <: Double ] as Liftable [T ] = new PrimitiveLiftable
29+ given Liftable_Char_delegate [ T <: Char ] as Liftable [T ] = new PrimitiveLiftable
30+ given Liftable_String_delegate [ T <: String ] as Liftable [T ] = new PrimitiveLiftable
3131
3232 private class PrimitiveLiftable [T <: Unit | Null | Int | Boolean | Byte | Short | Int | Long | Float | Double | Char | String ] extends Liftable [T ] {
3333 /** Lift a primitive value `n` into `'{ n }` */
You can’t perform that action at this time.
0 commit comments