aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 33d108540..feee05d86 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -104,9 +104,10 @@ object Types {
*/
def isRef(sym: Symbol)(implicit ctx: Context): Boolean = stripTypeVar match {
case this1: TypeRef =>
- val thissym = this1.symbol
- if (thissym.isAliasType) this1.info.bounds.hi.isRef(sym)
- else thissym eq sym
+ this1.info match { // see comment in Namers/typeDefSig
+ case TypeBounds(lo, hi) if lo eq hi => hi.isRef(sym)
+ case _ => this1.symbol eq sym
+ }
case this1: RefinedType =>
// make sure all refinements are type arguments
this1.parent.isRef(sym) && this.argInfos.nonEmpty