Skip to content

Commit

Permalink
remove redundant text
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Sep 21, 2023
1 parent 79c827f commit b2ffe93
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
This has type: string
But if conditions must always be of type: bool

Conditions for if statements must always evaluate to bool. To fix this, change the highlighted code so it evaluates to a bool.
To fix this, change the highlighted code so it evaluates to a bool.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
This has type: string
But if conditions must always be of type: bool

Conditions for if statements must always evaluate to bool. To fix this, change the highlighted code so it evaluates to a bool.
To fix this, change the highlighted code so it evaluates to a bool.
2 changes: 1 addition & 1 deletion jscomp/ml/typecore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ let print_expr_type_clash ?typeClashContext env trace ppf = begin
| Some Switch ->
fprintf ppf "\n\n All branches in a @{<info>switch@} must return the same type. To fix this, change your branch to return the expected type."
| Some IfCondition ->
fprintf ppf "\n\n Conditions for @{<info>if@} statements must always evaluate to @{<info>bool@}. To fix this, change the highlighted code so it evaluates to a @{<info>bool@}."
fprintf ppf "\n\n To fix this, change the highlighted code so it evaluates to a @{<info>bool@}."
| Some IfReturn ->
fprintf ppf "\n\n @{<info>if@} expressions must return the same type in all branches (@{<info>if@}, @{<info>else if@}, @{<info>else@})."
| Some MaybeUnwrapOption ->
Expand Down

0 comments on commit b2ffe93

Please sign in to comment.