Skip to content

Commit 040d834

Browse files
committed
update tests (more tests to come)
1 parent b64ae7a commit 040d834

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

tests/neg-custom-args/nowarn/nowarn-parser-typer.check

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@
55
| its body in a block; no exceptions are handled.
66

77
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
1010
| ^^^^^
1111
| A try without catch or finally is equivalent to putting
1212
| its body in a block; no exceptions are handled.
1313

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+
1424
longer explanation available when compiling with `-explain`
1525
-- [E129] Potential Issue Error: tests/neg-custom-args/nowarn/nowarn-parser-typer.scala:16:11 --------------------------
1626
16 |def t3 = { 1; 2 } // error, the invalid nowarn doesn't silence this warning

tests/neg-custom-args/nowarn/nowarn-parser-typer.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ def t2 = f // not reported because refchecks doesn't run
1515
@nowarn("wat?") // error, invalid filter
1616
def t3 = { 1; 2 } // error, the invalid nowarn doesn't silence this warning
1717

18-
@nowarn("id=E129") def t4 = { 1; 2 }
18+
@nowarn("id=E129") def t4a = { 1; 2 }
19+
@nowarn("name=PureExpressionInStatementPosition") def t4b = { 1; 2 }
1920
@nowarn("id=E000") def t5a = try 1
2021
@nowarn("id=E0") def t5b = try 1
2122
@nowarn("id=0") def t5c = try 1
2223
@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

0 commit comments

Comments
 (0)