File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,7 @@ trait ImplicitRunInfo { self: Run =>
486486 * Under Scala-2 mode, package objects of package references on `p` also count
487487 * towards the implicit scope.
488488 * - If `tp` is a (non-opaque) alias of `tp'`, S contains the implicit scope of `tp'`.
489+ * - If `tp` is a singleton type, S contains the implicit scope of its underlying type.
489490 * - If `tp` is some other type, its implicit scope is the union of the implicit scopes of
490491 * its parts (parts defined as in the spec).
491492 *
@@ -523,7 +524,7 @@ trait ImplicitRunInfo { self: Run =>
523524 override implicit protected val ctx : Context = liftingCtx
524525 override def stopAtStatic = true
525526
526- def apply (tp : Type ) = tp match {
527+ def apply (tp : Type ) = tp.widenDealias match {
527528 case tp : TypeRef =>
528529 ((defn.AnyType : Type ) /: anchors(tp))(AndType .make(_, _))
529530 case tp : TypeVar =>
@@ -580,7 +581,7 @@ trait ImplicitRunInfo { self: Run =>
580581 }
581582 case _ =>
582583 }
583- tp.dealias match {
584+ tp.widenDealias match {
584585 case tp : TypeRef =>
585586 val sym = tp.symbol
586587 if (isAnchor(sym)) {
You can’t perform that action at this time.
0 commit comments