Skip to content

Commit 3c93ada

Browse files
Remove assertion
Apparently this is reachable under normal circonstances (tests/pos-deep-subtype/i5876.scala), but throwing a CyclicReference execption sounds like the currect thing to do here, right?
1 parent af9d3a5 commit 3c93ada

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,11 +2876,6 @@ object Types {
28762876
def ref(using Context): Type =
28772877
if computed then
28782878
if myRef == null then
2879-
// if errors were reported previously handle this by throwing a CyclicReference
2880-
// instead of crashing immediately. A test case is neg/i6057.scala.
2881-
assert(ctx.mode.is(Mode.CheckCyclic)
2882-
|| ctx.mode.is(Mode.Printing)
2883-
|| ctx.reporter.errorsReported)
28842879
throw CyclicReference(NoDenotation)
28852880
else
28862881
computed = true

0 commit comments

Comments
 (0)