Skip to content

Commit f2a74c9

Browse files
committedJul 15, 2017
Fix checking code
Caused cyclic reference exceptions before
1 parent 2fdc581 commit f2a74c9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed
 

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,10 +1528,14 @@ object Types {
15281528
/** Hook for adding debug check code when denotations are assigned */
15291529
final def checkDenot()(implicit ctx: Context) =
15301530
if (Config.checkTypeRefCycles)
1531-
lastDenotation.info match {
1532-
case TypeBounds(lo, hi) =>
1533-
assert(lo ne this)
1534-
assert(hi ne this)
1531+
lastDenotation match {
1532+
case d: SingleDenotation =>
1533+
d.infoOrCompleter match {
1534+
case TypeBounds(lo, hi) =>
1535+
assert(lo ne this)
1536+
assert(hi ne this)
1537+
case _ =>
1538+
}
15351539
case _ =>
15361540
}
15371541

0 commit comments

Comments
 (0)
Please sign in to comment.