File tree 5 files changed +27
-9
lines changed
compiler/test/dotty/tools/dotc/reporting
5 files changed +27
-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
73
73
case _ => " "
74
74
}
75
75
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)
85
79
}
86
80
}
87
81
Original file line number Diff line number Diff line change 4
4
| expression expected but [31mend[0m found
5
5
6
6
longer 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 9
9
| Required: String
10
10
11
11
longer 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 28
28
| The start of this line does not match any of the previous indentation widths.
29
29
| Indentation width of current line : 1 tab, 2 spaces
30
30
| 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 22
22
30 | val b = '
23
23
| ^
24
24
| 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