File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -490,7 +490,10 @@ object SymDenotations {
490490 def recur (self : Type ): Unit = self match
491491 case RefinedType (parent, name, rinfo) => rinfo match
492492 case TypeAlias (lzy : LazyRef ) if name == this .name =>
493- lzy.update(tp)
493+ if ! lzy.completed then
494+ lzy.update(tp)
495+ else
496+ throw CyclicReference (this )
494497 case _ =>
495498 recur(parent)
496499 recur(owner.asClass.givenSelfType)
Original file line number Diff line number Diff line change 1+ object impl :
2+ case object UNone
3+
4+ import impl ._
5+
6+ opaque type UOption [+ A ] = (A | UNone .type ) // error: Cyclic Reference involving UOption
Original file line number Diff line number Diff line change 1+ val UNone : UOption [Nothing ] = ??? // error: Cyclic Reference involving UOption
You can’t perform that action at this time.
0 commit comments