File tree Expand file tree Collapse file tree 5 files changed +14
-16
lines changed Expand file tree Collapse file tree 5 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 11-- Error: tests/init-global/neg/global-cycle1.scala:1:7 ----------------------------------------------------------------
221 |object A { // error
3- |^
4- |Cyclic initialization: object A -> object B -> object A. Calling trace:
5- |-> object A { // error [ global-cycle1.scala:1 ]
6- | ^
7- |-> val a: Int = B.b [ global-cycle1.scala:2 ]
8- | ^
9- |-> object B { [ global-cycle1.scala:5 ]
10- | ^
11- |-> val b: Int = A.a // error [ global-cycle1.scala:6 ]
12- | ^
13- 2 | val a: Int = B.b
14- 3 |}
3+ | ^
4+ | Cyclic initialization: object A -> object B -> object A. Calling trace:
5+ | -> object A { // error [ global-cycle1.scala:1 ]
6+ | ^
7+ | -> val a: Int = B.b [ global-cycle1.scala:2 ]
8+ | ^
9+ | -> object B { [ global-cycle1.scala:5 ]
10+ | ^
11+ | -> val b: Int = A.a // error [ global-cycle1.scala:6 ]
12+ | ^
1513-- Error: tests/init-global/neg/global-cycle1.scala:6:17 ---------------------------------------------------------------
16146 | val b: Int = A.a // error
1715 | ^^^
Original file line number Diff line number Diff line change 11object A { // error
22 val n : Int = B .m
33 class Inner {
4- println(n)
4+ println(n) // error
55 }
66}
77
Original file line number Diff line number Diff line change 1- object D {
1+ object D { // error
22 def aaa = 1 // that’s the reason
33 class Z (depends : Any )
44 case object D1 extends Z (aaa) // 'null' when calling D.D1 first time // error
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ object DeadLockTest {
88
99 }
1010
11- object Parent {
11+ object Parent { // error
1212 trait Child {
1313 Thread .sleep(2000 ) // ensure concurrent behavior
1414 val parent = Parent
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ class BaseClass(s: String) {
22 def print : Unit = ()
33}
44
5- object Obj {
5+ object Obj { // error
66 val s : String = " hello"
77
88 object AObj extends BaseClass (s) // error
You can’t perform that action at this time.
0 commit comments