Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small error message text change (remove comma after "But") #6409

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
5 │ f(1, 2)
6 │

This function call is at the top level and is expected to return `unit`. But, it's returning `int => int`.
This function call is at the top level and is expected to return `unit`. But it's returning `int => int`.

In ReScript, anything at the top level must evaluate to `unit`. You can fix this by assigning the expression to a value, or piping it into the `ignore` function.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
3 │ returnsSomething()
4 │

This function call is at the top level and is expected to return `unit`. But, it's returning `int`.
This function call is at the top level and is expected to return `unit`. But it's returning `int`.

In ReScript, anything at the top level must evaluate to `unit`. You can fix this by assigning the expression to a value, or piping it into the `ignore` function.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1 │ 1234
2 │

This is at the top level and is expected to return `unit`. But, it's returning `int`.
This is at the top level and is expected to return `unit`. But it's returning `int`.

In ReScript, anything at the top level must evaluate to `unit`. You can fix this by assigning the expression to a value, or piping it into the `ignore` function.

Expand Down
2 changes: 1 addition & 1 deletion jscomp/ext/warnings.ml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ let message = function
"Integer literal exceeds the range of representable integers of type int"
| Bs_uninterpreted_delimiters s -> "Uninterpreted delimiters " ^ s
| Bs_toplevel_expression_unit help ->
Printf.sprintf "This%sis at the top level and is expected to return `unit`. But, it's returning %s.\n\n In ReScript, anything at the top level must evaluate to `unit`. You can fix this by assigning the expression to a value, or piping it into the `ignore` function.%s"
Printf.sprintf "This%sis at the top level and is expected to return `unit`. But it's returning %s.\n\n In ReScript, anything at the top level must evaluate to `unit`. You can fix this by assigning the expression to a value, or piping it into the `ignore` function.%s"
(match help with
| Some (_, FunctionCall) -> " function call "
| _ -> " ")
Expand Down