File tree 5 files changed +10
-10
lines changed
compiler/src/dotty/tools/dotc/transform/init 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -1042,7 +1042,7 @@ object Semantic {
1042
1042
1043
1043
/** Utility definition used for better error-reporting of argument errors */
1044
1044
case class ArgInfo (value : Value , source : Tree ) {
1045
- def promote : Contextual [List [Error ]] = value.promote(" May only use initialized value as arguments" , source)
1045
+ def promote : Contextual [List [Error ]] = value.promote(" Only initialized values may be used as arguments" , source)
1046
1046
}
1047
1047
1048
1048
/** Evaluate an expression with the given value for `this` in a given class `klass`
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. May only use initialized value as arguments.
4
+ | Cannot prove that the value is fully-initialized. Only initialized values may be used as arguments.
5
5
|
6
- | The unsafe promotion may cause the following problem:
7
- | Cannot prove that the value is fully initialized. May only use initialized value as arguments.
6
+ | The unsafe promotion may cause the following problem:
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/default-this.scala:9:8 ------------------------------------------------------------------------
2
2
9 | compare() // error
3
3
| ^^^^^^^
4
- | Cannot prove that the value is fully initialized. May only use initialized value as arguments. Calling trace:
5
- | -> val result = updateThenCompare(5) [ default-this.scala:11 ]
4
+ |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments. Calling trace:
5
+ | -> val result = updateThenCompare(5) [ default-this.scala:11 ]
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. May only use initialized value 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
- | Cannot prove that the value is fully initialized. May only use initialized value as arguments.
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. May only use initialized value 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. May only use initialized value 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