Skip to content

Commit 7a4468d

Browse files
Julowpanglesd
authored andcommitted
Remove unreachable cases
1 parent a37c27d commit 7a4468d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/model/reference.ml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,7 @@ let parse whole_reference_location s :
292292
| `TModuleType ->
293293
`ModuleType
294294
(signature next_token tokens, ModuleTypeName.make_std identifier)
295-
| `TPathComponent ->
296-
`Module_path (path [ identifier ] next_token tokens)
295+
| `TPathComponent -> assert false
297296
| _ ->
298297
expected ~expect_paths:true [ "module"; "module-type" ] location
299298
|> Error.raise_exception)
@@ -396,7 +395,7 @@ let parse whole_reference_location s :
396395
| `TClassType ->
397396
`ClassType
398397
(signature next_token tokens, ClassTypeName.make_std identifier)
399-
| `TPathComponent -> `Page_path (path [ identifier ] next_token tokens)
398+
| `TPathComponent -> assert false
400399
| _ ->
401400
expected ~expect_paths:true
402401
[ "module"; "module-type"; "type"; "class"; "class-type" ]
@@ -500,7 +499,7 @@ let parse whole_reference_location s :
500499
in
501500
(* Prefixed pages are not differentiated. *)
502501
`Page_path (path [ identifier ] next_token tokens)
503-
| `TPathComponent -> `Page_path (path [ identifier ] next_token tokens))
502+
| `TPathComponent -> assert false)
504503
in
505504

506505
let old_kind, s, location =

0 commit comments

Comments
 (0)