File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -173,15 +173,10 @@ class ReifyQuotes extends MacroTransformWithImplicits {
173
173
// Maps type splices to type references of tags e.g., ~t -> some type T$1
174
174
val map : Map [Type , Type ] = tagsExplicitTypeDefsPairs.map(x => (x._1, x._2.symbol.typeRef)).toMap
175
175
val tMap = new TypeMap () {
176
- override def apply (tp : Type ): Type = {
177
- if (map.contains(tp))
178
- map.apply(tp)
179
- else
180
- mapOver(tp)
181
- }
176
+ override def apply (tp : Type ): Type = map.getOrElse(tp, mapOver(tp))
182
177
}
183
178
184
- Block (typeDefs ++ tagsExplicitTypeDefsPairs.map(_._2) ,
179
+ Block (typeDefs ++ explicitTypeDefs ,
185
180
new TreeTypeMap (
186
181
typeMap = tMap,
187
182
substFrom = itags.map(_._1.symbol),
@@ -462,8 +457,6 @@ class ReifyQuotes extends MacroTransformWithImplicits {
462
457
case tree : TypeTree if tree.tpe.typeSymbol.isSplice =>
463
458
val splicedType = tree.tpe.asInstanceOf [TypeRef ].prefix.termSymbol
464
459
splice(ref(splicedType).select(tpnme.UNARY_~ ))
465
- case tree : TypeApply =>
466
- super .transform(tree)
467
460
case tree : Select if tree.symbol.isSplice =>
468
461
splice(tree)
469
462
case tree : RefTree if needsLifting(tree) =>
Original file line number Diff line number Diff line change @@ -117,11 +117,9 @@ package liftable {
117
117
}
118
118
119
119
object Arrays {
120
- // FIXME missing hole for ~t
121
- // implicit def ArrayIsLiftable[T: Liftable](implicit t: Type[T], ct: Expr[ClassTag[T]]): Liftable[Array[T]] = (arr: Array[T]) => '{
122
- // new Array[~t](~(arr.length: Expr[Int]))(~ct)
123
- // }
124
-
120
+ implicit def ArrayIsLiftable [T : Liftable ](implicit t : Type [T ], ct : Expr [ClassTag [T ]]): Liftable [Array [T ]] = (arr : Array [T ]) => ' {
121
+ new Array [~ t](~ (arr.length: Expr [Int ]))(~ ct)
122
+ }
125
123
}
126
124
127
125
}
You can’t perform that action at this time.
0 commit comments