File tree Expand file tree Collapse file tree 6 files changed +31
-9
lines changed
compiler/test/dotty/tools/dotc/reporting Expand file tree Collapse file tree 6 files changed +31
-9
lines changed Original file line number Diff line number Diff line change @@ -73,15 +73,9 @@ extends Reporter with UniqueMessagePositions with HideNonSensicalMessages with M
7373 case _ => " "
7474 }
7575
76- dia match {
77- case dia : Error => {
78- _errorBuf.append(dia)
79- _consoleReporter.doReport(dia)
80- printMessageAndPos(dia, extra)
81- }
82- case dia =>
83- printMessageAndPos(dia, extra)
84- }
76+ if dia.level >= ERROR then _errorBuf.append(dia)
77+ if dia.level >= WARNING then _consoleReporter.doReport(dia)
78+ printMessageAndPos(dia, extra)
8579 }
8680}
8781
Original file line number Diff line number Diff line change 222242 | @JSName(new NamesClass().a) // error
2323 | ^^^^^^^^^^^^^^^^^^
2424 | A js.Symbol argument to JSName must be a static, stable identifier
25+ -- Warning: tests/neg-scalajs/jsname-argument.scala:49:10 --------------------------------------------------------------
26+ 49 | @JSName(a) // warning, untested
27+ | ^
28+ |This symbol is defined in the same object as the annotation's target. This will cause a stackoverflow at runtime
2529-- Error: tests/neg-scalajs/jsname-argument.scala:57:3 -----------------------------------------------------------------
263057 | @JSName(Names.sym) // error
2731 | ^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 44 | expression expected but [31mend[0m found
55
66longer explanation available when compiling with `-explain`
7+ -- [E129] Potential Issue Warning: tests/neg/i12150.scala:1:11 ---------------------------------------------------------
8+ 1 |def f: Unit = // error
9+ | ^
10+ | A pure expression does nothing in statement position; you may be omitting necessary parentheses
11+
12+ longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 99 | Required: String
1010
1111longer explanation available when compiling with `-explain`
12+ -- Warning: tests/neg/i2033.scala:6:37 ---------------------------------------------------------------------------------
13+ 6 | val out = new ObjectOutputStream(println)
14+ | ^^^^^^^
15+ |method println is eta-expanded even though java.io.OutputStream does not have the @FunctionalInterface annotation.
Original file line number Diff line number Diff line change 2828 | The start of this line does not match any of the previous indentation widths.
2929 | Indentation width of current line : 1 tab, 2 spaces
3030 | This falls between previous widths: 1 tab and 1 tab, 4 spaces
31+ -- [E129] Potential Issue Warning: tests/neg/spaces-vs-tabs.scala:13:6 -------------------------------------------------
32+ 13 | 1
33+ | ^
34+ | A pure expression does nothing in statement position; you may be omitting necessary parentheses
35+
36+ longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 222230 | val b = '
2323 | ^
2424 | unclosed character literal
25+ -- Warning: tests/neg/t6810.scala:6:0 ----------------------------------------------------------------------------------
26+ 6 |' // but not embedded EOL sequences not represented as escapes
27+ |^
28+ |Line is indented too far to the left, or a `}` is missing
29+ -- Warning: tests/neg/t6810.scala:31:0 ---------------------------------------------------------------------------------
30+ 31 |' // anypos-error CR seen as EOL by scanner; FSR, error only on open quote, unlike `y`
31+ |^
32+ |Line is indented too far to the left, or a `}` is missing
You can’t perform that action at this time.
0 commit comments