File tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,8 @@ trait ImplicitRunInfo { self: Run =>
483
483
* - If `tp` is a reference `p.T` to a class or opaque type alias, S also contains all object references
484
484
* on the prefix path `p`. Under Scala-2 mode, package objects of package references on `p` also
485
485
* count towards the implicit scope.
486
- * - If `tp` is an alias of `tp'`, S contains the implicit scope of `tp'`.
486
+ * - If `tp` is a (non-opaque) alias of `tp'`, S contains the implicit scope of `tp'`.
487
+ * - If `tp` is a singleton type, S contains the implicit scope of its underlying type.
487
488
* - If `tp` is some other type, its implicit scope is the union of the implicit scopes of
488
489
* its parts (parts defined as in the spec).
489
490
*
@@ -520,7 +521,7 @@ trait ImplicitRunInfo { self: Run =>
520
521
override implicit protected val ctx : Context = liftingCtx
521
522
override def stopAtStatic = true
522
523
523
- def apply (tp : Type ) = tp match {
524
+ def apply (tp : Type ) = tp.widenDealias match {
524
525
case tp : TypeRef =>
525
526
((defn.AnyType : Type ) /: anchors(tp))(AndType .make(_, _))
526
527
case tp : TypeVar =>
@@ -577,7 +578,7 @@ trait ImplicitRunInfo { self: Run =>
577
578
}
578
579
case _ =>
579
580
}
580
- tp.dealias match {
581
+ tp.widenDealias match {
581
582
case tp : TypeRef =>
582
583
val sym = tp.symbol
583
584
if (isAnchor(sym)) {
You can’t perform that action at this time.
0 commit comments