File tree 7 files changed +9
-9
lines changed
compiler/src/dotty/tools/dotc/transform/init
7 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ object Errors {
98
98
99
99
def show (using Context ): String = {
100
100
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 +
102
102
" \n The unsafe promotion may cause the following problem:\n " +
103
103
errors.head.show + errors.head.stacktrace
104
104
}
Original file line number Diff line number Diff line change 1
1
-- Error: tests/init/neg/closureLeak.scala:11:14 -----------------------------------------------------------------------
2
2
11 | l.foreach(a => a.addX(this)) // error
3
3
| ^^^^^^^^^^^^^^^^^
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.
5
5
|
6
6
| The unsafe promotion may cause the following problem:
7
7
| 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 1
1
-- Error: tests/init/neg/enum-desugared.scala:17:15 --------------------------------------------------------------------
2
2
17 | Array(this.LazyErrorId, this.NoExplanationID) // error // error
3
3
| ^^^^^^^^^^^^^^^^
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.
5
5
|
6
6
| The unsafe promotion may cause the following problem:
7
7
| Calling the external method method name may cause initialization errors. Calling trace:
10
10
-- Error: tests/init/neg/enum-desugared.scala:17:33 --------------------------------------------------------------------
11
11
17 | Array(this.LazyErrorId, this.NoExplanationID) // error // error
12
12
| ^^^^^^^^^^^^^^^^^^^^
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.
14
14
|
15
15
| The unsafe promotion may cause the following problem:
16
16
| Calling the external method method ordinal may cause initialization errors. Calling trace:
Original file line number Diff line number Diff line change 1
1
-- Error: tests/init/neg/enum.scala:4:8 --------------------------------------------------------------------------------
2
2
4 | NoExplanationID // error
3
3
| ^
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.
5
5
|
6
6
| The unsafe promotion may cause the following problem:
7
7
| Calling the external method method name may cause initialization errors. Calling trace:
Original file line number Diff line number Diff line change 1
1
-- Error: tests/init/neg/inherit-non-hot.scala:6:34 --------------------------------------------------------------------
2
2
6 | if b == null then b = new B(this) // error
3
3
| ^^^^^^^^^^^
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.
5
5
| Calling trace:
6
6
| -> val c = new C [ inherit-non-hot.scala:19 ]
7
7
| -> class C extends A { [ inherit-non-hot.scala:15 ]
Original file line number Diff line number Diff line change 1
1
-- Error: tests/init/neg/promotion-loop.scala:16:10 --------------------------------------------------------------------
2
2
16 | println(b) // error
3
3
| ^
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.
5
5
|
6
6
| The unsafe promotion may cause the following problem:
7
7
| 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 1
1
-- Error: tests/init/neg/t3273.scala:4:42 ------------------------------------------------------------------------------
2
2
4 | val num1: LazyList[Int] = 1 #:: num1.map(_ + 1) // error
3
3
| ^^^^^^^^^^^^^^^
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.
5
5
|
6
6
| The unsafe promotion may cause the following problem:
7
7
| Access non-initialized value num1. Calling trace:
8
8
| -> val num1: LazyList[Int] = 1 #:: num1.map(_ + 1) // error [ t3273.scala:4 ]
9
9
-- Error: tests/init/neg/t3273.scala:5:61 ------------------------------------------------------------------------------
10
10
5 | val num2: LazyList[Int] = 1 #:: num2.iterator.map(_ + 1).to(LazyList) // error
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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.
13
13
|
14
14
| The unsafe promotion may cause the following problem:
15
15
| Access non-initialized value num2. Calling trace:
You can’t perform that action at this time.
0 commit comments