Skip to content

Commit

Permalink
tests: update failed cases for new constant declaration syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Fedotov authored and feds01 committed Sep 23, 2024
1 parent 68fed75 commit b9d5426
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions tests/cases/exhaustiveness/missing_enums.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ error[0083]: non-exhaustive patterns: `(Option::None, Option::None)` not covered
5 | loop {
6 | return match (left, right) {
| ^^^^^^^^^^^^^ pattern `(Option::None, Option::None)` not covered
7 | (Option::Some(a), Option::Some(b)) => a + b,
7 | (Option.Some(a), Option.Some(b)) => a + b,

error[0083]: non-exhaustive patterns: `Direction::South`, and `Direction::East` not covered
--> $DIR/missing_enums.hash:25:16
24 | direction_to_int := (dir: Direction) -> i32 => {
25 | return match dir {
| ^^^ patterns `Direction::South`, and `Direction::East` not covered
26 | Direction::North => 1,
26 | Direction.North => 1,

error[0083]: non-exhaustive patterns: `(Direction::South, Direction::South)`, `(Direction::South, Direction::West)`, `(Direction::South, Direction::East)` and 9 more not covered
--> $DIR/missing_enums.hash:33:11
32 | join_directions := (dir: Direction, other: Direction) -> Direction => {
33 | match (dir, other) {
| ^^^^^^^^^^^^ patterns `(Direction::South, Direction::South)`, `(Direction::South, Direction::West)`, `(Direction::South, Direction::East)` and 9 more not covered
34 | (Direction::North, Direction::South) => Direction::North,
34 | (Direction.North, Direction.South) => Direction.North,
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
error: expected a name here
--> $DIR/double_colon_in_map_literal.hash:3:15
error: expected an expression, however received a `::`
--> $DIR/double_colon_in_map_literal.hash:3:13
2 |
3 | k := map!{ 1::2 };
| ^
= help: expected a `identifier`
| ^^
8 changes: 4 additions & 4 deletions tests/cases/parser/misc/triple_colon_in_access_name.stderr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
error: expected a name here
--> $DIR/triple_colon_in_access_name.hash:3:7
error: expected field name access or a method call
--> $DIR/triple_colon_in_access_name.hash:3:5
2 |
3 | a::b:::c<int>();
| ^
3 | a.b.:c<int>();
| ^
= help: expected a `identifier`
6 changes: 3 additions & 3 deletions tests/cases/parser/types/malformed_function_type.stderr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
error: unexpectedly encountered a `>`
--> $DIR/malformed_function_type.hash:3:20
--> $DIR/malformed_function_type.hash:3:21
2 |
3 | str_eq: (str, str) > str;
| ^
= help: expected a `=`
| ^
= help: expected either `:`, or `=`
4 changes: 2 additions & 2 deletions tests/cases/semantics/pats/intrinsics_in_pats.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[0024]: cannot use an intrinsic in pattern position
--> $DIR/intrinsics_in_pats.hash:5:5
4 | match 1 {
5 | Intrinsics::user_error => {}
| ^^^^^^^^^^^^^^^^^^^^^^
5 | Intrinsics.user_error => {}
| ^^^^^^^^^^^^^^^^^^^^^
6 | }
= info: cannot use this in pattern position as it refers to a compiler intrinsic

0 comments on commit b9d5426

Please sign in to comment.