Skip to content

Commit f98f796

Browse files
committed
Re-remove dead bs_syntaxerr variants (Conflict_bs_bs_this_bs_meth, Unhandled_poly_type)
A prior revert that fixed the Misplaced_label_syntax line move also restored these two dead variants. Neither is reachable: Conflict_bs_bs_this_bs_meth is never raised, and Unhandled_poly_type's only use was replaced with assert false in ast_core_type. Remove both again; keep Misplaced_label_syntax in place.
1 parent 0d322ce commit f98f796

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

compiler/frontend/bs_syntaxerr.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ type untagged_variant = OnlyOneUnknown | AtMostOneObject | AtMostOneArray
2626

2727
type error =
2828
| Unsupported_predicates
29-
| Conflict_bs_bs_this_bs_meth
3029
| Duplicated_bs_deriving
3130
| Conflict_attributes
3231
| Expect_int_literal
3332
| Expect_string_literal
3433
| Expect_int_or_string_or_json_literal
35-
| Unhandled_poly_type
3634
| Invalid_underscore_type_in_external
3735
| Invalid_bs_string_type
3836
| Invalid_bs_int_type
@@ -65,15 +63,12 @@ let pp_error fmt err =
6563
| Not_supported_directive_in_bs_return -> "Not supported return directive"
6664
| Illegal_attribute -> "Illegal attributes"
6765
| Unsupported_predicates -> "unsupported predicates"
68-
| Conflict_bs_bs_this_bs_meth ->
69-
"%@this and %@bs can not be applied at the same time"
7066
| Duplicated_bs_deriving -> "duplicate @deriving attribute"
7167
| Conflict_attributes -> "conflicting attributes "
7268
| Expect_string_literal -> "expect string literal "
7369
| Expect_int_literal -> "expect int literal "
7470
| Expect_int_or_string_or_json_literal ->
7571
"expect int, string literal or json literal {json|text here|json} "
76-
| Unhandled_poly_type -> "Unhandled poly type"
7772
| Invalid_underscore_type_in_external ->
7873
"_ is not allowed in combination with external optional type"
7974
| Invalid_bs_string_type -> "Not a valid type for %@string"

compiler/frontend/bs_syntaxerr.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ type untagged_variant = OnlyOneUnknown | AtMostOneObject | AtMostOneArray
2626

2727
type error =
2828
| Unsupported_predicates
29-
| Conflict_bs_bs_this_bs_meth
3029
| Duplicated_bs_deriving
3130
| Conflict_attributes
3231
| Expect_int_literal
3332
| Expect_string_literal
3433
| Expect_int_or_string_or_json_literal
35-
| Unhandled_poly_type
3634
| Invalid_underscore_type_in_external
3735
| Invalid_bs_string_type
3836
| Invalid_bs_int_type

0 commit comments

Comments
 (0)