Skip to content

Commit a8c7f15

Browse files
authored
Small error message text change (remove comma after "But") (#6409)
1 parent 9d7f2c2 commit a8c7f15

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

jscomp/build_tests/super_errors/expected/partial_app.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
5 │ f(1, 2)
88
6 │
99

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

1212
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.
1313

jscomp/build_tests/super_errors/expected/top_level_fn_call_not_unit.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
3 │ returnsSomething()
88
4 │
99

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

1212
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.
1313

jscomp/build_tests/super_errors/expected/top_level_value_not_unit.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1 │ 1234
66
2 │
77

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

1010
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.
1111

jscomp/ext/warnings.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ let message = function
493493
"Integer literal exceeds the range of representable integers of type int"
494494
| Bs_uninterpreted_delimiters s -> "Uninterpreted delimiters " ^ s
495495
| Bs_toplevel_expression_unit help ->
496-
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"
496+
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"
497497
(match help with
498498
| Some (_, FunctionCall) -> " function call "
499499
| _ -> " ")

0 commit comments

Comments
 (0)