Skip to content

Commit ded027e

Browse files
committed
Review changes
1 parent 749fc3c commit ded027e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+69
-66
lines changed

compiler/src/dotty/tools/dotc/reporting/Reporter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ abstract class Reporter extends interfaces.ReporterResult {
209209
def incomplete(dia: Diagnostic)(using Context): Unit =
210210
incompleteHandler(dia, ctx)
211211

212-
def finalizeReporting()(using Context) =
212+
def finalizeReporting()(using Context) =
213213
if (hasWarnings && ctx.settings.XfatalWarnings.value)
214-
report(new Error("No warnings can be incurred under -Werror.", NoSourcePosition))
214+
report(new Error("No warnings can be incurred under -Werror (or -Xfatal-warnings)", NoSourcePosition))
215215

216216
/** Summary of warnings and errors */
217217
def summary: String = {

compiler/test-resources/repl/rewrite-messages

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ scala> import scala.util._
44
1 | import scala.util._
55
| ^
66
| `_` is no longer supported for a wildcard import; use `*` instead
7-
No warnings can be incurred under -Werror.
7+
No warnings can be incurred under -Werror (or -Xfatal-warnings)
88
1 warning found
99
1 error found
1010
scala> extension (x: Int) def foo(y: Int) = x + y
@@ -15,6 +15,6 @@ scala> 2 foo 4
1515
| ^^^
1616
|Alphanumeric method foo is not declared infix; it should not be used as infix operator.
1717
|Instead, use method syntax .foo(...) or backticked identifier `foo`.
18-
No warnings can be incurred under -Werror.
18+
No warnings can be incurred under -Werror (or -Xfatal-warnings)
1919
1 warning found
2020
1 error found

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,8 @@ class CompilationTests {
215215
// initialization tests
216216
@Test def checkInitGlobal: Unit = {
217217
implicit val testGroup: TestGroup = TestGroup("checkInitGlobal")
218-
val options = defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings")
219218
compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkWarnings()
220-
compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile()
219+
compileFilesInDir("tests/init-global/pos", defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings"), FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile()
221220
}
222221

223222
// initialization tests

tests/neg-custom-args/sourcepath2/hi/A.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
| class Hello is in the wrong directory.
55
| It was declared to be in package <empty>
66
| But it is found in directory hi
7-
No warnings can be incurred under -Werror.
7+
No warnings can be incurred under -Werror (or -Xfatal-warnings)

tests/neg-macros/i9570.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
15 | case '{HCons(_,$t)} => // warn (in .check file)
33
| ^
44
| Use of `_` for lambda in quoted pattern. Use explicit lambda instead or use `$_` to match any term.
5-
No warnings can be incurred under -Werror.
5+
No warnings can be incurred under -Werror (or -Xfatal-warnings)

tests/neg-macros/i9570.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ object Macros {
2020

2121
inline def size(inline expr: HList ): Int = {
2222
${sizeImpl('expr,0)}
23-
}
23+
}
2424

2525
}
2626
}
2727

28-
// nopos-error No warnings can be incurred under -Werror.
28+
// nopos-error No warnings can be incurred under -Werror (or -Xfatal-warnings)

tests/neg-macros/macro-deprecation.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
5 |inline def f = ${ impl } // warn (in .check file)
33
| ^^^^
44
| method impl is deprecated
5-
No warnings can be incurred under -Werror.
5+
No warnings can be incurred under -Werror (or -Xfatal-warnings)

tests/neg-macros/macro-deprecation.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ import scala.quoted.*
55
inline def f = ${ impl } // warn (in .check file)
66
@deprecated def impl(using Quotes) = '{1}
77

8-
// nopos-error No warnings can be incurred under -Werror.
8+
// nopos-error No warnings can be incurred under -Werror (or -Xfatal-warnings)

tests/neg-scalajs/enumeration-warnings.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
| ^^^^^^^^^^^^
5959
| Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time.
6060
| The resulting program is unlikely to function properly.
61-
No warnings can be incurred under -Werror.
61+
No warnings can be incurred under -Werror (or -Xfatal-warnings)

tests/neg-scalajs/enumeration-warnings.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ class ExtendsValWithNullName extends Enumeration {
3636
protected class Val2 extends Val(1, null) // warn
3737
}
3838

39-
// nopos-error: No warnings can be incurred under -Werror.
39+
// nopos-error: No warnings can be incurred under -Werror (or -Xfatal-warnings)

0 commit comments

Comments
 (0)