Skip to content

Commit

Permalink
Remove unreachable cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Julow committed Jul 10, 2024
1 parent e66ecbd commit fcaa46e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/model/reference.ml
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ let parse whole_reference_location s :
| `TModuleType ->
`ModuleType
(signature next_token tokens, ModuleTypeName.make_std identifier)
| `TPathComponent ->
`Module_path (path [ identifier ] next_token tokens)
| `TPathComponent -> assert false
| _ ->
expected ~expect_paths:true [ "module"; "module-type" ] location
|> Error.raise_exception)
Expand Down Expand Up @@ -396,7 +395,7 @@ let parse whole_reference_location s :
| `TClassType ->
`ClassType
(signature next_token tokens, ClassTypeName.make_std identifier)
| `TPathComponent -> `Page_path (path [ identifier ] next_token tokens)
| `TPathComponent -> assert false
| _ ->
expected ~expect_paths:true
[ "module"; "module-type"; "type"; "class"; "class-type" ]
Expand Down Expand Up @@ -500,7 +499,7 @@ let parse whole_reference_location s :
in
(* Prefixed pages are not differentiated. *)
`Page_path (path [ identifier ] next_token tokens)
| `TPathComponent -> `Page_path (path [ identifier ] next_token tokens))
| `TPathComponent -> assert false)
in

let old_kind, s, location =
Expand Down

0 comments on commit fcaa46e

Please sign in to comment.