-
-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle echo not followed by an expression to print
- Loading branch information
1 parent
f4fca50
commit b83e497
Showing
14 changed files
with
149 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...pe_/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: echo | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:1:1 | ||
│ | ||
1 │ echo | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
.../tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_10.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\npub fn main() {\n echo\n |> todo\n}\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:3:3 | ||
│ | ||
3 │ echo | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\n pub fn wibble(a) { a }\n\n pub fn main() {\n wibble(echo)\n }\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:5:12 | ||
│ | ||
5 │ wibble(echo) | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_3.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\n pub fn main() {\n echo + 1\n }\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:3:5 | ||
│ | ||
3 │ echo + 1 | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_4.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\n pub fn main() {\n \"wibble\" <> echo\n }\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:3:17 | ||
│ | ||
3 │ "wibble" <> echo | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_5.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\npub fn main() {\n panic as echo\n}\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:3:12 | ||
│ | ||
3 │ panic as echo | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_6.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\npub fn main() {\n [echo, 1, 2]\n}\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:3:4 | ||
│ | ||
3 │ [echo, 1, 2] | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_7.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\npub fn main() {\n #(1, echo)\n}\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:3:8 | ||
│ | ||
3 │ #(1, echo) | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_8.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\npub fn main() {\n todo\n |> fn(_) { echo }\n |> todo\n}\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:4:14 | ||
│ | ||
4 │ |> fn(_) { echo } | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |
11 changes: 11 additions & 0 deletions
11
..._/tests/snapshots/gleam_core__type___tests__errors__echo_followed_by_no_expression_9.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: compiler-core/src/type_/tests/errors.rs | ||
expression: "\npub fn main() {\n todo\n |> { echo }\n |> todo\n}\n" | ||
--- | ||
error: Invalid echo use | ||
┌─ /src/one/two.gleam:4:8 | ||
│ | ||
4 │ |> { echo } | ||
│ ^^^^ I was expecting a value after this | ||
|
||
The `echo` keyword should be followed by a value to print. |