File tree 6 files changed +11
-5
lines changed
compiler/src/dotty/tools/dotc
6 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,12 @@ object ExplicitOuter {
317
317
case _ =>
318
318
// Need to be careful to dealias before erasure, otherwise we lose prefixes.
319
319
atPhaseNoLater(erasurePhase)(outerPrefix(tpe.underlying))
320
+ // underlying is fine here and below since we are calling this after erasure.
321
+ // However, there is some weird stuff going on with parboiled2 where an
322
+ // AppliedType with a type alias as constructor is fed to outerPrefix.
323
+ // For some other unknown reason this works with underlying but not with superType.
324
+ // I was not able to minimize the problem and parboiled2 spits out way too much
325
+ // macro generated code to be able to pinpoint the root problem.
320
326
}
321
327
case tpe : TypeProxy =>
322
328
outerPrefix(tpe.underlying)
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ object TypeUtils {
104
104
case self @ TypeRef (prefix, _) if self.symbol.isClass =>
105
105
prefix.select(self.symbol.companionModule).asInstanceOf [TermRef ]
106
106
case self : TypeProxy =>
107
- self.underlying .mirrorCompanionRef
107
+ self.superType .mirrorCompanionRef
108
108
}
109
109
110
110
/** Is this type a methodic type that takes implicit parameters (both old and new) at some point? */
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ trait Deriving {
286
286
case tp @ TypeRef (prefix, _) if tp.symbol.isClass =>
287
287
prefix.select(tp.symbol.companionModule).asInstanceOf [TermRef ]
288
288
case tp : TypeProxy =>
289
- companionRef(tp.underlying )
289
+ companionRef(tp.superType )
290
290
}
291
291
val resultType = instantiated(sym.info)
292
292
val companion = companionRef(resultType)
Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ class ImplicitSearchError(
387
387
.map(userDefinedImplicitNotFoundTypeMessage)
388
388
.find(_.isDefined).flatten
389
389
case tp : TypeProxy =>
390
- recur(tp.underlying )
390
+ recur(tp.superType )
391
391
case tp : AndType =>
392
392
recur(tp.tp1).orElse(recur(tp.tp2))
393
393
case _ =>
Original file line number Diff line number Diff line change @@ -763,7 +763,7 @@ trait ImplicitRunInfo:
763
763
WildcardType
764
764
else
765
765
seen += t
766
- t.underlying match
766
+ t.superType match
767
767
case TypeBounds (lo, hi) =>
768
768
if lo.isBottomTypeAfterErasure then apply(hi)
769
769
else AndType .make(apply(lo), apply(hi))
Original file line number Diff line number Diff line change @@ -366,7 +366,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
366
366
// avoid type aliases for tuples
367
367
Right (MirrorSource .GenericTuple (types))
368
368
case _ => reduce(tp.underlying)
369
- case _ => reduce(tp.underlying )
369
+ case _ => reduce(tp.superType )
370
370
case tp @ AndType (l, r) =>
371
371
for
372
372
lsrc <- reduce(l)
You can’t perform that action at this time.
0 commit comments