From 608fbca82816c6b43def0b38de5f93133954e8ae Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 20 Jan 2014 14:50:51 +0100 Subject: For a typeRef, prefer info.isAlias over symbol.isAliasType Reason: This works even for typeRefs with joint-ref denotations, even if the symbol does not exist. The only reason to use symbol.isAliasType is if info.isAlias can produce a cycle. --- src/dotty/tools/dotc/typer/Implicits.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer/Implicits.scala') diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index 9cc472ba4..10ba90055 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -485,7 +485,7 @@ class SearchHistory(val searchDepth: Int, val seen: Map[ClassSymbol, Int]) { def apply(n: Int, tp: Type): Int = tp match { case tp: RefinedType => foldOver(n + 1, tp) - case tp: TypeRef if tp.symbol.isAliasType => + case tp: TypeRef if tp.info.isAlias => apply(n, tp.info.bounds.hi) case _ => foldOver(n, tp) -- cgit v1.2.3