Skip to content

Commit b23c6b8

Browse files
committed
Don't inspect info when dealiasing classes
Forces a bit less, and could be more efficient. Did not seem to make a difference with current CyclicReferences though, except that cyclic error happened a bit later in the sequence.
1 parent e8b07a3 commit b23c6b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dotty/tools/dotc/core/Types.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,8 @@ object Types {
746746
*/
747747
final def dealias(implicit ctx: Context): Type = this match {
748748
case tp: TypeRef =>
749-
tp.info match {
749+
if (tp.symbol.isClass) tp
750+
else tp.info match {
750751
case TypeAlias(tp) => tp.dealias
751752
case _ => tp
752753
}
@@ -3258,7 +3259,7 @@ object Types {
32583259
val ex = new CyclicReference(denot)
32593260
if (!(ctx.mode is typer.Mode.CheckCyclic)) {
32603261
cyclicErrors.println(ex.getMessage)
3261-
for (elem <- ex.getStackTrace take 50)
3262+
for (elem <- ex.getStackTrace take 200)
32623263
cyclicErrors.println(elem.toString)
32633264
}
32643265
ex

0 commit comments

Comments
 (0)