Skip to content

Commit 97e7fcc

Browse files
committed
Fix tests
1 parent f51e1fc commit 97e7fcc

File tree

4 files changed

+14
-40
lines changed

4 files changed

+14
-40
lines changed

tests/init/neg/apply2.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ object O:
33
println(n)
44

55
class B:
6-
val a = A(this) // error
6+
val a = A(this)
77

88
val b = new B
9-
val n = 10
9+
val n = 10 // error
1010
end O

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

+11-11
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. 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 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+
| ^^^^^^^^^^^^^^^
1313
|
14-
| Promoting the value to fully initialized failed due to the following problem:
15-
| Cannot prove that the field val a is fully initialized.
14+
|Promoting the value to fully initialized failed due to the following problem:
15+
|Cannot prove that the field val a is fully initialized.

tests/init/neg/local-warm4.check

-26
This file was deleted.

tests/init/neg/local-warm4.scala renamed to tests/init/pos/local-warm4.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object localWarm {
1515
override def increment(): Unit = {
1616
def updateA(): Unit = {
1717
val newA = new A(y)
18-
a = newA // error
18+
a = newA // ok: newA can be promoted to hot
1919
}
2020
y = y + 1
2121
updateA()

0 commit comments

Comments
 (0)