Skip to content

Commit 1130c52

Browse files
authored
Merge pull request #14400 from Xavientois/remove-unnecessary-hyphen
Change error message text from "fully-initialized" to "fully initialized"
2 parents ef25672 + 1e79bc8 commit 1130c52

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiler/src/dotty/tools/dotc/transform/init/Errors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
"\nThe unsafe promotion may cause the following problem:\n" +
103103
errors.head.show + errors.head.stacktrace
104104
}

tests/init/neg/closureLeak.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/closureLeak.scala:11:14 -----------------------------------------------------------------------
22
11 | 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.

tests/init/neg/enum-desugared.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/enum-desugared.scala:17:15 --------------------------------------------------------------------
22
17 | 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:
@@ -10,7 +10,7 @@
1010
-- Error: tests/init/neg/enum-desugared.scala:17:33 --------------------------------------------------------------------
1111
17 | 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:

tests/init/neg/enum.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/enum.scala:4:8 --------------------------------------------------------------------------------
22
4 | 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:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/inherit-non-hot.scala:6:34 --------------------------------------------------------------------
22
6 | 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 ]

tests/init/neg/promotion-loop.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Error: tests/init/neg/promotion-loop.scala:16:10 --------------------------------------------------------------------
22
16 | 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.

tests/init/neg/t3273.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
-- Error: tests/init/neg/t3273.scala:4:42 ------------------------------------------------------------------------------
22
4 | 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 ------------------------------------------------------------------------------
1010
5 | 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:

0 commit comments

Comments
 (0)