File tree 2 files changed +20
-3
lines changed
tests/neg-custom-args/nowarn 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 5
5
| its body in a block; no exceptions are handled.
6
6
7
7
longer explanation available when compiling with `-explain`
8
- -- [E000] Syntax Error: tests/neg-custom-args/nowarn/nowarn-parser-typer.scala:22 :26 -----------------------------------
9
- 22 |@nowarn("id=1") def t5d = try 1 // error, wrong id
8
+ -- [E000] Syntax Error: tests/neg-custom-args/nowarn/nowarn-parser-typer.scala:23 :26 -----------------------------------
9
+ 23 |@nowarn("id=1") def t5d = try 1 // error, wrong id
10
10
| ^^^^^
11
11
| A try without catch or finally is equivalent to putting
12
12
| its body in a block; no exceptions are handled.
13
13
14
+ longer explanation available when compiling with `-explain`
15
+ -- [E000] Syntax Error: tests/neg-custom-args/nowarn/nowarn-parser-typer.scala:25:28 -----------------------------------
16
+ 25 |@nowarn("verbose") def t6 = try 1 // error with details
17
+ | ^^^^^
18
+ | A try without catch or finally is equivalent to putting
19
+ | its body in a block; no exceptions are handled.
20
+ Matching filters for @nowarn or -Wconf:
21
+ - id=E0
22
+ - name=EmptyCatchOrFinallyBlock
23
+
14
24
longer explanation available when compiling with `-explain`
15
25
-- [E129] Potential Issue Error: tests/neg-custom-args/nowarn/nowarn-parser-typer.scala:16:11 --------------------------
16
26
16 |def t3 = { 1; 2 } // error, the invalid nowarn doesn't silence this warning
Original file line number Diff line number Diff line change @@ -15,8 +15,15 @@ def t2 = f // not reported because refchecks doesn't run
15
15
@ nowarn(" wat?" ) // error, invalid filter
16
16
def t3 = { 1 ; 2 } // error, the invalid nowarn doesn't silence this warning
17
17
18
- @ nowarn(" id=E129" ) def t4 = { 1 ; 2 }
18
+ @ nowarn(" id=E129" ) def t4a = { 1 ; 2 }
19
+ @ nowarn(" name=PureExpressionInStatementPosition" ) def t4b = { 1 ; 2 }
19
20
@ nowarn(" id=E000" ) def t5a = try 1
20
21
@ nowarn(" id=E0" ) def t5b = try 1
21
22
@ nowarn(" id=0" ) def t5c = try 1
22
23
@ nowarn(" id=1" ) def t5d = try 1 // error, wrong id
24
+
25
+ @ nowarn(" verbose" ) def t6 = try 1 // error with details
26
+
27
+ @ nowarn(" cat=unchecked" ) def t7 (x : Any ) = x match
28
+ case _ : List [Int ] => 0
29
+ case _ => 1
You can’t perform that action at this time.
0 commit comments