From fcaa46ed157d17baabe14f48c2413b7b499a7c5a Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Wed, 10 Jul 2024 18:23:32 +0200 Subject: [PATCH] Remove unreachable cases --- src/model/reference.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/model/reference.ml b/src/model/reference.ml index c9e4eedd7b..9108c9cd47 100644 --- a/src/model/reference.ml +++ b/src/model/reference.ml @@ -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) @@ -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" ] @@ -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 =