Skip to content

Commit 0012a83

Browse files
committed
Tweak %identity error message.
1 parent 4e0b087 commit 0012a83

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

jscomp/frontend/bs_ast_invariant.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ let emit_external_warnings : iterator =
157157
match byte_name with
158158
| "%identity" when not (Ast_core_type.is_arity_one pval_type) ->
159159
Location.raise_errorf ~loc:pval_loc
160-
"%%identity expect its type to be of form 'a -> 'b (arity 1)"
160+
"%%identity expects a function type of the form 'a => 'b \
161+
(arity 1)"
161162
| _ ->
162163
if byte_name <> "" then
163164
let c = String.unsafe_get byte_name 0 in

lib/4.06.1/unstable/js_compiler.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -263897,7 +263897,8 @@ let emit_external_warnings : iterator =
263897263897
match byte_name with
263898263898
| "%identity" when not (Ast_core_type.is_arity_one pval_type) ->
263899263899
Location.raise_errorf ~loc:pval_loc
263900-
"%%identity expect its type to be of form 'a -> 'b (arity 1)"
263900+
"%%identity expects a function type of the form 'a => 'b \
263901+
(arity 1)"
263901263902
| _ ->
263902263903
if byte_name <> "" then
263903263904
let c = String.unsafe_get byte_name 0 in

lib/4.06.1/unstable/js_playground_compiler.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -265360,7 +265360,8 @@ let emit_external_warnings : iterator =
265360265360
match byte_name with
265361265361
| "%identity" when not (Ast_core_type.is_arity_one pval_type) ->
265362265362
Location.raise_errorf ~loc:pval_loc
265363-
"%%identity expect its type to be of form 'a -> 'b (arity 1)"
265363+
"%%identity expects a function type of the form 'a => 'b \
265364+
(arity 1)"
265364265365
| _ ->
265365265366
if byte_name <> "" then
265366265367
let c = String.unsafe_get byte_name 0 in

lib/4.06.1/whole_compiler.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -180193,7 +180193,8 @@ let emit_external_warnings : iterator =
180193180193
match byte_name with
180194180194
| "%identity" when not (Ast_core_type.is_arity_one pval_type) ->
180195180195
Location.raise_errorf ~loc:pval_loc
180196-
"%%identity expect its type to be of form 'a -> 'b (arity 1)"
180196+
"%%identity expects a function type of the form 'a => 'b \
180197+
(arity 1)"
180197180198
| _ ->
180198180199
if byte_name <> "" then
180199180200
let c = String.unsafe_get byte_name 0 in

0 commit comments

Comments
 (0)