File tree Expand file tree Collapse file tree 7 files changed +9
-9
lines changed
compiler/src/dotty/tools/dotc/transform/init Expand file tree Collapse file tree 7 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ object Errors {
9898
9999 def show (using Context ): String = {
100100 var index = 0
101- " Cannot prove that the value is fully- initialized. " + msg + " .\n " + stacktrace +
101+ " Cannot prove that the value is fully initialized. " + msg + " .\n " + stacktrace +
102102 " \n The unsafe promotion may cause the following problem:\n " +
103103 errors.head.show + errors.head.stacktrace
104104 }
Original file line number Diff line number Diff line change 11-- Error: tests/init/neg/closureLeak.scala:11:14 -----------------------------------------------------------------------
2211 | l.foreach(a => a.addX(this)) // error
33 | ^^^^^^^^^^^^^^^^^
4- | Cannot prove that the value is fully- initialized. Only initialized values may be used as arguments.
4+ | Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
55 |
66 | The unsafe promotion may cause the following problem:
77 | Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
Original file line number Diff line number Diff line change 11-- Error: tests/init/neg/enum-desugared.scala:17:15 --------------------------------------------------------------------
2217 | Array(this.LazyErrorId, this.NoExplanationID) // error // error
33 | ^^^^^^^^^^^^^^^^
4- | Cannot prove that the value is fully- initialized. May only use initialized value as method arguments.
4+ | Cannot prove that the value is fully initialized. May only use initialized value as method arguments.
55 |
66 | The unsafe promotion may cause the following problem:
77 | Calling the external method method name may cause initialization errors. Calling trace:
1010-- Error: tests/init/neg/enum-desugared.scala:17:33 --------------------------------------------------------------------
111117 | Array(this.LazyErrorId, this.NoExplanationID) // error // error
1212 | ^^^^^^^^^^^^^^^^^^^^
13- | Cannot prove that the value is fully- initialized. May only use initialized value as method arguments.
13+ | Cannot prove that the value is fully initialized. May only use initialized value as method arguments.
1414 |
1515 | The unsafe promotion may cause the following problem:
1616 | Calling the external method method ordinal may cause initialization errors. Calling trace:
Original file line number Diff line number Diff line change 11-- Error: tests/init/neg/enum.scala:4:8 --------------------------------------------------------------------------------
224 | NoExplanationID // error
33 | ^
4- | Cannot prove that the value is fully- initialized. May only use initialized value as method arguments.
4+ | Cannot prove that the value is fully initialized. May only use initialized value as method arguments.
55 |
66 | The unsafe promotion may cause the following problem:
77 | Calling the external method method name may cause initialization errors. Calling trace:
Original file line number Diff line number Diff line change 11-- Error: tests/init/neg/inherit-non-hot.scala:6:34 --------------------------------------------------------------------
226 | if b == null then b = new B(this) // error
33 | ^^^^^^^^^^^
4- | Cannot prove that the value is fully- initialized. May only assign fully initialized value.
4+ | Cannot prove that the value is fully initialized. May only assign fully initialized value.
55 | Calling trace:
66 | -> val c = new C [ inherit-non-hot.scala:19 ]
77 | -> class C extends A { [ inherit-non-hot.scala:15 ]
Original file line number Diff line number Diff line change 11-- Error: tests/init/neg/promotion-loop.scala:16:10 --------------------------------------------------------------------
2216 | println(b) // error
33 | ^
4- | Cannot prove that the value is fully- initialized. Only initialized values may be used as arguments.
4+ | Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
55 |
66 | The unsafe promotion may cause the following problem:
77 | Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
Original file line number Diff line number Diff line change 11-- Error: tests/init/neg/t3273.scala:4:42 ------------------------------------------------------------------------------
224 | val num1: LazyList[Int] = 1 #:: num1.map(_ + 1) // error
33 | ^^^^^^^^^^^^^^^
4- | Cannot prove that the value is fully- initialized. Only initialized values may be used as arguments.
4+ | Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
55 |
66 | The unsafe promotion may cause the following problem:
77 | Access non-initialized value num1. Calling trace:
88 | -> val num1: LazyList[Int] = 1 #:: num1.map(_ + 1) // error [ t3273.scala:4 ]
99-- Error: tests/init/neg/t3273.scala:5:61 ------------------------------------------------------------------------------
10105 | val num2: LazyList[Int] = 1 #:: num2.iterator.map(_ + 1).to(LazyList) // error
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12- | Cannot prove that the value is fully- initialized. Only initialized values may be used as arguments.
12+ | Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
1313 |
1414 | The unsafe promotion may cause the following problem:
1515 | Access non-initialized value num2. Calling trace:
You can’t perform that action at this time.
0 commit comments