Skip to content

Commit 452d397

Browse files
committed
Update check files
1 parent 216da52 commit 452d397

23 files changed

+220
-220
lines changed

tests/init-global/neg/global-cycle1.check

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
1 |object A { // error
33
| ^
44
| 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 ]
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 ]
1212
| ^
1313
-- Error: tests/init-global/neg/global-cycle1.scala:6:17 ---------------------------------------------------------------
1414
6 | val b: Int = A.a // error
1515
| ^^^
16-
| Access uninitialized field value a. Call trace:
17-
| -> object B { [ global-cycle1.scala:5 ]
18-
| ^
19-
| -> val b: Int = A.a // error [ global-cycle1.scala:6 ]
16+
| Access uninitialized field value a. Calling trace:
17+
| ├── object B { [ global-cycle1.scala:5 ]
18+
| ^
19+
| └── val b: Int = A.a // error [ global-cycle1.scala:6 ]
2020
| ^^^

tests/init-global/neg/line-spacing.check

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
3 | B
33
4 | .s.length // error
44
| ^
5-
| Access uninitialized field value s. Call trace:
6-
| -> object B { [ line-spacing.scala:7 ]
7-
| ^
8-
| -> val s: String = s"${A.a}a" [ line-spacing.scala:8 ]
9-
| ^^^
10-
| -> def a: Int = [ line-spacing.scala:2 ]
11-
| ^
12-
| -> .s.length // error [ line-spacing.scala:4 ]
5+
| Access uninitialized field value s. Calling trace:
6+
| ├── object B { [ line-spacing.scala:7 ]
7+
| ^
8+
| ├── val s: String = s"${A.a}a" [ line-spacing.scala:8 ]
9+
| ^^^
10+
| ├── def a: Int = [ line-spacing.scala:2 ]
11+
| ^
12+
| └── .s.length // error [ line-spacing.scala:4 ]
1313
| ^

tests/init-global/neg/patmat-unapplySeq.check

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
8 | def apply(i: Int): Box = array(i) // error
33
| ^^^^^^^^
44
|Reading mutable state of object A during initialization of object B.
5-
|Reading mutable state of other static objects is forbidden as it breaks initialization-time irrelevance. Calling trace:
6-
|-> object B: [ patmat-unapplySeq.scala:15 ]
7-
| ^
8-
|-> case A(b) => [ patmat-unapplySeq.scala:17 ]
9-
| ^^^^
10-
|-> def apply(i: Int): Box = array(i) // error [ patmat-unapplySeq.scala:8 ]
5+
|Reading mutable state of other static objects is forbidden as it breaks initialization-time irrelevance. Calling trace:Calling trace:
6+
|├── object B: [ patmat-unapplySeq.scala:15 ]
7+
| ^
8+
|├── case A(b) => [ patmat-unapplySeq.scala:17 ]
9+
| ^^^^
10+
|└── def apply(i: Int): Box = array(i) // error [ patmat-unapplySeq.scala:8 ]
1111
| ^^^^^^^^

tests/init/neg/closureLeak.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
11 | l.foreach(a => a.addX(this)) // error
33
| ^^^^^^^^^^^^^^^^^
44
|Could not verify that the method argument is transitively initialized (Hot). It was found to be a function where "this" is (the original object of type (class Outer) where initialization checking started). Only transitively initialized arguments may be passed to methods (except constructors). Calling trace:
5-
|-> class Outer { [ closureLeak.scala:1 ]
6-
| ^
7-
|-> l.foreach(a => a.addX(this)) // error [ closureLeak.scala:11 ]
5+
|├── class Outer { [ closureLeak.scala:1 ]
6+
| ^
7+
|└── l.foreach(a => a.addX(this)) // error [ closureLeak.scala:11 ]
88
| ^^^^^^^^^^^^^^^^^
99
|
1010
|Promoting the value to transitively initialized (Hot) failed due to the following problem:
1111
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class Outer) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
1212
|Non initialized field(s): value p. Promotion trace:
13-
|-> l.foreach(a => a.addX(this)) // error [ closureLeak.scala:11 ]
13+
|└── l.foreach(a => a.addX(this)) // error [ closureLeak.scala:11 ]
1414
| ^^^^

tests/init/neg/cycle-structure.check

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22
3 | val x = B(this) // error
33
| ^^^^^^^
44
| Problematic object instantiation: arg 1 is not transitively initialized (Hot). Calling trace:
5-
| -> case class A(b: B) { [ cycle-structure.scala:1 ]
6-
| ^
7-
| -> val x = B(this) // error [ cycle-structure.scala:3 ]
5+
| ├── case class A(b: B) { [ cycle-structure.scala:1 ]
6+
| ^
7+
| └── val x = B(this) // error [ cycle-structure.scala:3 ]
88
| ^^^^^^^
99
|
1010
| It leads to the following error during object initialization:
1111
| Access field value x on an uninitialized (Cold) object. Calling trace:
12-
| -> case class B(a: A) { [ cycle-structure.scala:7 ]
13-
| ^
14-
| -> val x1 = a.x [ cycle-structure.scala:8 ]
12+
| ├── case class B(a: A) { [ cycle-structure.scala:7 ]
13+
| ^
14+
| └── val x1 = a.x [ cycle-structure.scala:8 ]
1515
| ^^^
1616
-- Error: tests/init/neg/cycle-structure.scala:9:13 --------------------------------------------------------------------
1717
9 | val x = A(this) // error
1818
| ^^^^^^^
1919
| Problematic object instantiation: arg 1 is not transitively initialized (Hot). Calling trace:
20-
| -> case class B(a: A) { [ cycle-structure.scala:7 ]
21-
| ^
22-
| -> val x = A(this) // error [ cycle-structure.scala:9 ]
20+
| ├── case class B(a: A) { [ cycle-structure.scala:7 ]
21+
| ^
22+
| └── val x = A(this) // error [ cycle-structure.scala:9 ]
2323
| ^^^^^^^
2424
|
2525
| It leads to the following error during object initialization:
2626
| Access field value x on an uninitialized (Cold) object. Calling trace:
27-
| -> case class A(b: B) { [ cycle-structure.scala:1 ]
28-
| ^
29-
| -> val x1 = b.x [ cycle-structure.scala:2 ]
27+
| ├── case class A(b: B) { [ cycle-structure.scala:1 ]
28+
| ^
29+
| └── val x1 = b.x [ cycle-structure.scala:2 ]
3030
| ^^^

tests/init/neg/default-this.check

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
| ^^^^^^^
44
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class B) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
55
|Non initialized field(s): value result. Calling trace:
6-
|-> class B extends A { [ default-this.scala:6 ]
7-
| ^
8-
|-> val result = updateThenCompare(5) [ default-this.scala:11 ]
9-
| ^^^^^^^^^^^^^^^^^^^^
10-
|-> def updateThenCompare(c: Int): Boolean = { [ default-this.scala:7 ]
11-
| ^
12-
|-> compare() // error [ default-this.scala:9 ]
6+
|├── class B extends A { [ default-this.scala:6 ]
7+
| ^
8+
|├── val result = updateThenCompare(5) [ default-this.scala:11 ]
9+
| ^^^^^^^^^^^^^^^^^^^^
10+
|├── def updateThenCompare(c: Int): Boolean = { [ default-this.scala:7 ]
11+
| ^
12+
|└── compare() // error [ default-this.scala:9 ]
1313
| ^^^^^^^

tests/init/neg/i15363.check

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
3 | val b = new B(this) // error
33
| ^^^^^^^^^^^
44
| Problematic object instantiation: arg 1 is not transitively initialized (Hot). Calling trace:
5-
| -> class A: [ i15363.scala:1 ]
6-
| ^
7-
| -> val b = new B(this) // error [ i15363.scala:3 ]
5+
| ├── class A: [ i15363.scala:1 ]
6+
| ^
7+
| └── val b = new B(this) // error [ i15363.scala:3 ]
88
| ^^^^^^^^^^^
99
|
1010
| It leads to the following error during object initialization:
1111
| Access field value m on an uninitialized (Cold) object. Calling trace:
12-
| -> class B(a: A): [ i15363.scala:7 ]
13-
| ^
14-
| -> val x = a.m [ i15363.scala:8 ]
12+
| ├── class B(a: A): [ i15363.scala:7 ]
13+
| ^
14+
| └── val x = a.m [ i15363.scala:8 ]
1515
| ^^^

tests/init/neg/i15459.check

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
| ^^^^
44
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class Sub) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
55
|Non initialized field(s): value b. Calling trace:
6-
|-> class Sub extends Sup: [ i15459.scala:5 ]
7-
| ^
8-
|-> class Sup: [ i15459.scala:1 ]
9-
| ^
10-
|-> println(this) // error [ i15459.scala:3 ]
6+
|├── class Sub extends Sup: [ i15459.scala:5 ]
7+
| ^
8+
|├── class Sup: [ i15459.scala:1 ]
9+
| ^
10+
|└── println(this) // error [ i15459.scala:3 ]
1111
| ^^^^

tests/init/neg/inherit-non-hot.check

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
6 | if b == null then b = new B(this) // error
33
| ^^^^^^^^^^^^^^^
44
|The RHS of reassignment must be transitively initialized (Hot). It was found to be a non-transitively initialized (Warm) object of type (class B) { outer = a transitively initialized (Hot) object, args = (an uninitialized (Cold) object) }. Calling trace:
5-
|-> class C extends A { [ inherit-non-hot.scala:15 ]
6-
| ^
7-
|-> val bAgain = toB.getBAgain [ inherit-non-hot.scala:16 ]
8-
| ^^^
9-
|-> def toB: B = [ inherit-non-hot.scala:5 ]
10-
| ^
11-
|-> if b == null then b = new B(this) // error [ inherit-non-hot.scala:6 ]
5+
|├── class C extends A { [ inherit-non-hot.scala:15 ]
6+
| ^
7+
|├── val bAgain = toB.getBAgain [ inherit-non-hot.scala:16 ]
8+
| ^^^
9+
|├── def toB: B = [ inherit-non-hot.scala:5 ]
10+
| ^
11+
|└── if b == null then b = new B(this) // error [ inherit-non-hot.scala:6 ]
1212
| ^^^^^^^^^^^^^^^
1313
|
1414
|Promoting the value to transitively initialized (Hot) failed due to the following problem:
1515
|Could not verify that the field value a is transitively initialized (Hot). It was found to be an uninitialized (Cold) object. Promotion trace:
16-
|-> class B(a: A) { [ inherit-non-hot.scala:10 ]
16+
|└── class B(a: A) { [ inherit-non-hot.scala:10 ]
1717
| ^^^^

tests/init/neg/inlined-method.check

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
| ^^^^^^^
44
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class InlineError) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
55
|Non initialized field(s): value v. Calling trace:
6-
|-> class InlineError { [ inlined-method.scala:1 ]
7-
| ^
8-
|-> Assertion.failAssert(this) [ inlined-method.scala:2 ]
9-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
10-
|-> scala.runtime.Scala3RunTime.assertFailed(message) // error [ inlined-method.scala:8 ]
6+
|├── class InlineError { [ inlined-method.scala:1 ]
7+
| ^
8+
|├── Assertion.failAssert(this) [ inlined-method.scala:2 ]
9+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
10+
|└── scala.runtime.Scala3RunTime.assertFailed(message) // error [ inlined-method.scala:8 ]
1111
| ^^^^^^^

tests/init/neg/inner-first.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| ^^^^
44
|Could not verify that the method argument is transitively initialized (Hot). It was found to be the original object of type (class B) where initialization checking started. Only transitively initialized arguments may be passed to methods (except constructors).
55
|Non initialized field(s): value n. Calling trace:
6-
|-> class B: [ inner-first.scala:2 ]
7-
| ^
8-
|-> println(this) // error [ inner-first.scala:3 ]
6+
|├── class B: [ inner-first.scala:2 ]
7+
| ^
8+
|└── println(this) // error [ inner-first.scala:3 ]
99
| ^^^^

tests/init/neg/leak-warm.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
19 | val l2 = l.map(_.m()) // error
33
| ^^^^^^^^^^^^
44
| Call method method map on an uninitialized (Cold) object. Calling trace:
5-
| -> object leakWarm { [ leak-warm.scala:1 ]
6-
| ^
7-
| -> val l2 = l.map(_.m()) // error [ leak-warm.scala:19 ]
5+
| ├── object leakWarm { [ leak-warm.scala:1 ]
6+
| ^
7+
| └── val l2 = l.map(_.m()) // error [ leak-warm.scala:19 ]
88
| ^^^^^^^^^^^^

tests/init/neg/promotion-loop.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
16 | println(b) // error
33
| ^
44
|Could not verify that the method argument is transitively initialized (Hot). It was found to be a non-transitively initialized (Warm) object of type (class B) { outer = the original object of type (class Test) where initialization checking started }. Only transitively initialized arguments may be passed to methods (except constructors). Calling trace:
5-
|-> class Test { test => [ promotion-loop.scala:1 ]
6-
| ^
7-
|-> println(b) // error [ promotion-loop.scala:16 ]
5+
|├── class Test { test => [ promotion-loop.scala:1 ]
6+
| ^
7+
|└── println(b) // error [ promotion-loop.scala:16 ]
88
| ^
99
|
1010
|Promoting the value to transitively initialized (Hot) failed due to the following problem:
1111
|Could not verify that the field value outer is transitively initialized (Hot). It was found to be the original object of type (class Test) where initialization checking started.
1212
|Non initialized field(s): value n. Promotion trace:
13-
|-> val outer = test [ promotion-loop.scala:12 ]
13+
|└── val outer = test [ promotion-loop.scala:12 ]
1414
| ^^^^^^^^^^^^^^^^

tests/init/neg/promotion-segment3.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
9 | bar(new B) // error
33
| ^^^^^
44
|Could not verify that the method argument is transitively initialized (Hot). It was found to be a non-transitively initialized (Warm) object of type (class B) { outer = the original object of type (class A) where initialization checking started }. Only transitively initialized arguments may be passed to methods (except constructors). Calling trace:
5-
|-> class A: [ promotion-segment3.scala:2 ]
6-
| ^
7-
|-> bar(new B) // error [ promotion-segment3.scala:9 ]
5+
|├── class A: [ promotion-segment3.scala:2 ]
6+
| ^
7+
|└── bar(new B) // error [ promotion-segment3.scala:9 ]
88
| ^^^^^
99
|
1010
|Promoting the value to transitively initialized (Hot) failed due to the following problem:

tests/init/neg/secondary-ctor4.check

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,43 @@
22
54 | val c = new C(b, 5) // error
33
| ^^^^^^^^^^^
44
| Problematic object instantiation: arg 1 is not transitively initialized (Hot). Calling trace:
5-
| -> class D { [ secondary-ctor4.scala:52 ]
6-
| ^
7-
| -> val c = new C(b, 5) // error [ secondary-ctor4.scala:54 ]
5+
| ├── class D { [ secondary-ctor4.scala:52 ]
6+
| ^
7+
| └── val c = new C(b, 5) // error [ secondary-ctor4.scala:54 ]
88
| ^^^^^^^^^^^
99
|
1010
| It leads to the following error during object initialization:
1111
| Access field value n on an uninitialized (Cold) object. Calling trace:
12-
| -> def this(b: B, x: Int) = this(b) [ secondary-ctor4.scala:49 ]
13-
| ^^^^^^^
14-
| -> class C(b: B) extends A(b) with T { [ secondary-ctor4.scala:48 ]
15-
| ^
16-
| -> def this(b: B) = { [ secondary-ctor4.scala:17 ]
17-
| ^
18-
| -> Inner().foo() [ secondary-ctor4.scala:26 ]
19-
| ^^^^^^^
20-
| -> class Inner() { [ secondary-ctor4.scala:21 ]
21-
| ^
22-
| -> println(b.n) [ secondary-ctor4.scala:23 ]
12+
| ├── def this(b: B, x: Int) = this(b) [ secondary-ctor4.scala:49 ]
13+
| ^^^^^^^
14+
| ├── class C(b: B) extends A(b) with T { [ secondary-ctor4.scala:48 ]
15+
| ^
16+
| ├── def this(b: B) = { [ secondary-ctor4.scala:17 ]
17+
| ^
18+
| ├── Inner().foo() [ secondary-ctor4.scala:26 ]
19+
| ^^^^^^^
20+
| ├── class Inner() { [ secondary-ctor4.scala:21 ]
21+
| ^
22+
| └── println(b.n) [ secondary-ctor4.scala:23 ]
2323
| ^^^
2424
-- Error: tests/init/neg/secondary-ctor4.scala:42:4 --------------------------------------------------------------------
2525
42 | new A(new B(new D)) // error
2626
| ^^^^^^^^^^^^^^^^^^^
2727
|Problematic object instantiation: the outer M.this and arg 1 are not transitively initialized (Hot). Calling trace:
28-
|-> class N(d: D) extends M(d) { [ secondary-ctor4.scala:59 ]
29-
| ^
30-
|-> def this(d: D) = { [ secondary-ctor4.scala:7 ]
31-
| ^
32-
|-> new A(new B(new D)) // error [ secondary-ctor4.scala:42 ]
28+
|├── class N(d: D) extends M(d) { [ secondary-ctor4.scala:59 ]
29+
| ^
30+
|├── def this(d: D) = { [ secondary-ctor4.scala:7 ]
31+
| ^
32+
|└── new A(new B(new D)) // error [ secondary-ctor4.scala:42 ]
3333
| ^^^^^^^^^^^^^^^^^^^
3434
|
3535
|It leads to the following error during object initialization:
3636
|Access field value n on an uninitialized (Cold) object. Calling trace:
37-
|-> def this(b: B) = { [ secondary-ctor4.scala:17 ]
38-
| ^
39-
|-> Inner().foo() [ secondary-ctor4.scala:26 ]
40-
| ^^^^^^^
41-
|-> class Inner() { [ secondary-ctor4.scala:21 ]
42-
| ^
43-
|-> println(b.n) [ secondary-ctor4.scala:23 ]
37+
|├── def this(b: B) = { [ secondary-ctor4.scala:17 ]
38+
| ^
39+
|├── Inner().foo() [ secondary-ctor4.scala:26 ]
40+
| ^^^^^^^
41+
|├── class Inner() { [ secondary-ctor4.scala:21 ]
42+
| ^
43+
|└── println(b.n) [ secondary-ctor4.scala:23 ]
4444
| ^^^

0 commit comments

Comments
 (0)