Skip to content

Commit 4e20675

Browse files
committed
Update check files
1 parent c13c9f5 commit 4e20675

11 files changed

+38
-38
lines changed

tests/init/neg/closureLeak.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
-- Error: tests/init/neg/closureLeak.scala:11:14 -----------------------------------------------------------------------
22
11 | l.foreach(a => a.addX(this)) // error
33
| ^^^^^^^^^^^^^^^^^
4-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
4+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
55
| Found = Fun { this = ThisRef[class Outer], owner = class Outer }. Calling trace:
66
| -> class Outer { [ closureLeak.scala:1 ]
77
| ^
88
| -> l.foreach(a => a.addX(this)) // error [ closureLeak.scala:11 ]
99
| ^^^^^^^^^^^^^^^^^
1010
|
11-
| Promoting the value to fully initialized failed due to the following problem:
12-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
11+
| Promoting the value to hot failed due to the following problem:
12+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
1313
| Found = ThisRef[class Outer].
1414
| Non initialized field(s): value p. Calling trace:
1515
| -> l.foreach(a => a.addX(this)) // error [ closureLeak.scala:11 ]

tests/init/neg/cycle-structure.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/cycle-structure.scala:3:13 --------------------------------------------------------------------
22
3 | val x = B(this) // error
33
| ^^^^^^^
4-
| Problematic object instantiation: arg 1 is not fully initialized. Calling trace:
4+
| Problematic object instantiation: arg 1 is not hot. Calling trace:
55
| -> case class A(b: B) { [ cycle-structure.scala:1 ]
66
| ^
77
| -> val x = B(this) // error [ cycle-structure.scala:3 ]
@@ -16,7 +16,7 @@
1616
-- Error: tests/init/neg/cycle-structure.scala:9:13 --------------------------------------------------------------------
1717
9 | val x = A(this) // error
1818
| ^^^^^^^
19-
| Problematic object instantiation: arg 1 is not fully initialized. Calling trace:
19+
| Problematic object instantiation: arg 1 is not hot. Calling trace:
2020
| -> case class B(a: A) { [ cycle-structure.scala:7 ]
2121
| ^
2222
| -> val x = A(this) // error [ cycle-structure.scala:9 ]

tests/init/neg/default-this.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/default-this.scala:9:8 ------------------------------------------------------------------------
22
9 | compare() // error
33
| ^^^^^^^
4-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
4+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
55
| Found = ThisRef[class B].
66
| Non initialized field(s): value result. Calling trace:
77
| -> class B extends A { [ default-this.scala:6 ]

tests/init/neg/i15363.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/i15363.scala:3:10 -----------------------------------------------------------------------------
22
3 | val b = new B(this) // error
33
| ^^^^^^^^^^^
4-
| Problematic object instantiation: arg 1 is not fully initialized. Calling trace:
4+
| Problematic object instantiation: arg 1 is not hot. Calling trace:
55
| -> class A: [ i15363.scala:1 ]
66
| ^
77
| -> val b = new B(this) // error [ i15363.scala:3 ]

tests/init/neg/i15459.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/i15459.scala:3:10 -----------------------------------------------------------------------------
22
3 | println(this) // error
33
| ^^^^
4-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
4+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
55
| Found = ThisRef[class Sub].
66
| Non initialized field(s): value b. Calling trace:
77
| -> class Sub extends Sup: [ i15459.scala:5 ]

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
-- Error: tests/init/neg/inherit-non-hot.scala:6:32 --------------------------------------------------------------------
22
6 | if b == null then b = new B(this) // error
33
| ^^^^^^^^^^^^^^^
4-
|The RHS of reassignment must be fully initialized. Found = Warm[class B] { outer = Hot, args = (Cold) }. 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 ]
12-
| ^^^^^^^^^^^^^^^
4+
| The RHS of reassignment must be hot. Found = Warm[class B] { outer = Hot, args = (Cold) }. 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 ]
12+
| ^^^^^^^^^^^^^^^
1313
|
14-
|Promoting the value to fully initialized failed due to the following problem:
15-
|Cannot prove that the field value a is fully initialized. Found = Cold.
14+
| Promoting the value to hot failed due to the following problem:
15+
| Cannot prove that the field value a is hot. Found = Cold.

tests/init/neg/inlined-method.check

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-- Error: tests/init/neg/inlined-method.scala:8:45 ---------------------------------------------------------------------
22
8 | scala.runtime.Scala3RunTime.assertFailed(message) // error
33
| ^^^^^^^
4-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
5-
| Found = ThisRef[class InlineError].
6-
| Non initialized field(s): value v. Calling trace:
7-
| -> class InlineError { [ inlined-method.scala:1 ]
8-
| ^
9-
| -> Assertion.failAssert(this) [ inlined-method.scala:2 ]
10-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
11-
| -> scala.runtime.Scala3RunTime.assertFailed(message) // error [ inlined-method.scala:8 ]
12-
| ^^^^^^^
4+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
5+
| Found = ThisRef[class InlineError].
6+
| Non initialized field(s): value v. Calling trace:
7+
| -> class InlineError { [ inlined-method.scala:1 ]
8+
| ^
9+
| -> Assertion.failAssert(this) [ inlined-method.scala:2 ]
10+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
11+
| -> scala.runtime.Scala3RunTime.assertFailed(message) // error [ inlined-method.scala:8 ]
12+
| ^^^^^^^

tests/init/neg/inner-first.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/inner-first.scala:3:12 ------------------------------------------------------------------------
22
3 | println(this) // error
33
| ^^^^
4-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
4+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
55
| Found = ThisRef[class B].
66
| Non initialized field(s): value n. Calling trace:
77
| -> class B: [ inner-first.scala:2 ]

tests/init/neg/promotion-loop.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
-- Error: tests/init/neg/promotion-loop.scala:16:10 --------------------------------------------------------------------
22
16 | println(b) // error
33
| ^
4-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
4+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
55
| Found = Warm[class B] { outer = ThisRef[class Test] }. Calling trace:
66
| -> class Test { test => [ promotion-loop.scala:1 ]
77
| ^
88
| -> println(b) // error [ promotion-loop.scala:16 ]
99
| ^
1010
|
11-
| Promoting the value to fully initialized failed due to the following problem:
12-
| Cannot prove that the field value outer is fully initialized. Found = ThisRef[class Test].
11+
| Promoting the value to hot failed due to the following problem:
12+
| Cannot prove that the field value outer is hot. Found = ThisRef[class Test].
1313
| Non initialized field(s): value n.

tests/init/neg/secondary-ctor4.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/secondary-ctor4.scala:54:14 -------------------------------------------------------------------
22
54 | val c = new C(b, 5) // error
33
| ^^^^^^^^^^^
4-
| Problematic object instantiation: arg 1 is not fully initialized. Calling trace:
4+
| Problematic object instantiation: arg 1 is not hot. Calling trace:
55
| -> class D { [ secondary-ctor4.scala:52 ]
66
| ^
77
| -> val c = new C(b, 5) // error [ secondary-ctor4.scala:54 ]
@@ -24,7 +24,7 @@
2424
-- Error: tests/init/neg/secondary-ctor4.scala:42:4 --------------------------------------------------------------------
2525
42 | new A(new B(new D)) // error
2626
| ^^^^^^^^^^^^^^^^^^^
27-
| Problematic object instantiation: the outer M.this and arg 1 are not fully initialized. Calling trace:
27+
| Problematic object instantiation: the outer M.this and arg 1 are not hot. Calling trace:
2828
| -> class N(d: D) extends M(d) { [ secondary-ctor4.scala:59 ]
2929
| ^
3030
| -> def this(d: D) = { [ secondary-ctor4.scala:7 ]

tests/init/neg/t3273.check

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
-- Error: tests/init/neg/t3273.scala:4:42 ------------------------------------------------------------------------------
22
4 | val num1: LazyList[Int] = 1 #:: num1.map(_ + 1) // error
33
| ^^^^^^^^^^^^^^^
4-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
4+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
55
| Found = Fun { this = ThisRef[object Test], owner = object Test }. Calling trace:
66
| -> object Test { [ t3273.scala:3 ]
77
| ^
88
| -> val num1: LazyList[Int] = 1 #:: num1.map(_ + 1) // error [ t3273.scala:4 ]
99
| ^^^^^^^^^^^^^^^
1010
|
11-
| Promoting the value to fully initialized failed due to the following problem:
11+
| Promoting the value to hot failed due to the following problem:
1212
| Access non-initialized value num1. Calling trace:
1313
| -> val num1: LazyList[Int] = 1 #:: num1.map(_ + 1) // error [ t3273.scala:4 ]
1414
| ^^^^
1515
-- Error: tests/init/neg/t3273.scala:5:61 ------------------------------------------------------------------------------
1616
5 | val num2: LazyList[Int] = 1 #:: num2.iterator.map(_ + 1).to(LazyList) // error
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18-
| Cannot prove the argument is fully initialized. Only fully initialized values are safe to leak.
18+
| Cannot prove the method argument is hot. Only hot values are safe to leak.
1919
| Found = Fun { this = ThisRef[object Test], owner = object Test }. Calling trace:
2020
| -> object Test { [ t3273.scala:3 ]
2121
| ^
2222
| -> val num2: LazyList[Int] = 1 #:: num2.iterator.map(_ + 1).to(LazyList) // error [ t3273.scala:5 ]
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424
|
25-
| Promoting the value to fully initialized failed due to the following problem:
25+
| Promoting the value to hot failed due to the following problem:
2626
| Access non-initialized value num2. Calling trace:
2727
| -> val num2: LazyList[Int] = 1 #:: num2.iterator.map(_ + 1).to(LazyList) // error [ t3273.scala:5 ]
2828
| ^^^^

0 commit comments

Comments
 (0)