Skip to content

Commit 95eea24

Browse files
committed
Move over more tests.
1 parent 2e004b8 commit 95eea24

5 files changed

+57
-41
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
-- [E032] Syntax Error: tests/neg/t5702-neg-bad-and-wild.scala:10:22 ---------------------------------------------------
2+
10 | case List(1, _*,) => // error: pattern expected // error
3+
| ^
4+
| pattern expected
5+
|
6+
| longer explanation available when compiling with `-explain`
7+
-- [E032] Syntax Error: tests/neg/t5702-neg-bad-and-wild.scala:12:23 ---------------------------------------------------
8+
12 | case List(1, _*3,) => // error: pattern expected // error // error
9+
| ^
10+
| pattern expected
11+
|
12+
| longer explanation available when compiling with `-explain`
13+
-- [E032] Syntax Error: tests/neg/t5702-neg-bad-and-wild.scala:15:18 ---------------------------------------------------
14+
15 | case List(x*, 1) => // error: pattern expected
15+
| ^
16+
| pattern expected
17+
|
18+
| longer explanation available when compiling with `-explain`
19+
-- [E031] Syntax Error: tests/neg/t5702-neg-bad-and-wild.scala:17:18 ---------------------------------------------------
20+
17 | case (1, x: _*) => // error: bad use of _* (sequence pattern not allowed)
21+
| ^
22+
| * can be used only for last argument
23+
|
24+
| longer explanation available when compiling with `-explain`
25+
-- [E032] Syntax Error: tests/neg/t5702-neg-bad-and-wild.scala:23:17 ---------------------------------------------------
26+
23 | val K(ns @ _*, x) = k // error: pattern expected
27+
| ^
28+
| pattern expected
29+
|
30+
| longer explanation available when compiling with `-explain`
31+
-- Error: tests/neg/t5702-neg-bad-and-wild.scala:10:21 -----------------------------------------------------------------
32+
10 | case List(1, _*,) => // error: pattern expected // error
33+
| ^
34+
| Values of types Null and Int cannot be compared with == or !=
35+
-- [E006] Not Found Error: tests/neg/t5702-neg-bad-and-wild.scala:12:20 ------------------------------------------------
36+
12 | case List(1, _*3,) => // error: pattern expected // error // error
37+
| ^
38+
| Not found: *
39+
|
40+
| longer explanation available when compiling with `-explain`
41+
-- Error: tests/neg/t5702-neg-bad-and-wild.scala:12:22 -----------------------------------------------------------------
42+
12 | case List(1, _*3,) => // error: pattern expected // error // error
43+
| ^
44+
| Values of types Null and Int cannot be compared with == or !=

tests/neg/t5702-neg-bad-brace.check

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- [E032] Syntax Error: tests/neg/t5702-neg-bad-brace.scala:14:21 ------------------------------------------------------
2+
14 | case List(1, _*} => // error
3+
| ^
4+
| pattern expected
5+
|
6+
| longer explanation available when compiling with `-explain`
7+
-- [E040] Syntax Error: tests/neg/t5702-neg-bad-brace.scala:17:0 -------------------------------------------------------
8+
17 |} // error
9+
|^
10+
|eof expected, but '}' found
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
object Test {
33

4-
def main(args: Array[String]) {
4+
def main(args: Array[String]) = {
55
val is = List(1,2,3)
66

77
is match {
@@ -11,7 +11,7 @@ object Test {
1111
// t5702-neg-bad-brace.scala:10: error: Unmatched closing brace '}' ignored here
1212
// t5702-neg-bad-brace.scala:10: error: illegal start of simple pattern (i.e., =>)
1313
// t5702-neg-bad-brace.scala:11: error: ')' expected but '}' found.
14-
case List(1, _*} =>
14+
case List(1, _*} => // error
1515
}
1616
}
17-
}
17+
} // error

tests/untried/neg/t5702-neg-bad-and-wild.check

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/untried/neg/t5702-neg-bad-brace.check

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)