@@ -207,7 +207,10 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
207
207
explicitTags.clear()
208
208
209
209
// Maps type splices to type references of tags e.g., ~t -> some type T$1
210
- val map : Map [Type , Type ] = tagsExplicitTypeDefsPairs.map(x => (x._1, x._2.symbol.typeRef)).toMap
210
+ val map : Map [Type , Type ] = {
211
+ tagsExplicitTypeDefsPairs.map(x => (x._1, x._2.symbol.typeRef)) ++
212
+ (itags.map(_._1) zip typeDefs.map(_.symbol.typeRef))
213
+ }.toMap
211
214
val tMap = new TypeMap () {
212
215
override def apply (tp : Type ): Type = map.getOrElse(tp, mapOver(tp))
213
216
}
@@ -242,7 +245,7 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
242
245
l == level ||
243
246
sym.is(Inline ) && sym.owner.is(Macro ) && sym.info.isValueType && l - 1 == level
244
247
case None =>
245
- true
248
+ level == 0
246
249
}
247
250
248
251
/** Issue a "splice outside quote" error unless we ar in the body of an inline method */
@@ -286,12 +289,12 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
286
289
if (! isThis) sym.show
287
290
else if (sym.is(ModuleClass )) sym.sourceModule.show
288
291
else i " ${sym.name}.this "
289
- if (! isThis && sym.maybeOwner.isType)
292
+ if (! isThis && sym.maybeOwner.isType && ! sym.is( Param ) )
290
293
check(sym.owner, sym.owner.thisType, pos)
291
294
else if (sym.exists && ! sym.isStaticOwner && ! levelOK(sym))
292
295
for (errMsg <- tryHeal(tp, pos))
293
296
ctx.error(em """ access to $symStr from wrong staging level:
294
- | - the definition is at level ${levelOf(sym)},
297
+ | - the definition is at level ${levelOf.getOrElse (sym, 0 )},
295
298
| - but the access is at level $level. $errMsg""" , pos)
296
299
}
297
300
@@ -310,7 +313,8 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
310
313
}
311
314
case tp : NamedType =>
312
315
check(tp.symbol, tp, pos)
313
- foldOver(acc, tp)
316
+ if (! tp.symbol.is(Param ))
317
+ foldOver(acc, tp)
314
318
case tp : ThisType =>
315
319
check(tp.cls, tp, pos)
316
320
foldOver(acc, tp)
0 commit comments