We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d490d13 commit 76ae609Copy full SHA for 76ae609
compiler/src/dotty/tools/dotc/transform/init/Objects.scala
@@ -864,7 +864,7 @@ class Objects(using Context @constructorOnly):
864
Bottom
865
866
case Bottom =>
867
- if field.isStaticObject then ObjectRef(field.moduleClass.asClass)
+ if field.isStaticObject then accessObject(field.moduleClass.asClass)
868
else Bottom
869
870
case ValueSet(values) =>
tests/init-global/warn/cyclic-object.scala
@@ -0,0 +1,9 @@
1
+package cyclicObject
2
+
3
+object O1 { // warn
4
+ val o = cyclicObject.O2
5
+}
6
7
+object O2 {
8
+ val o = cyclicObject.O1
9
0 commit comments