Skip to content

Commit

Permalink
Avoid crash
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Feb 14, 2024
1 parent 7fae629 commit 31c38b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ttype/type_comparator/atomic_type_comparator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,10 +889,10 @@ pub(crate) fn can_be_identical<'a>(
type1_part,
TAtomic::TEnum { .. } | TAtomic::TEnumLiteralCase { .. }
) {
let enum_info = codebase.classlike_infos.get(name).unwrap();

if let Some(enum_type) = &enum_info.enum_type {
type2_part = enum_type;
if let Some(enum_info) = codebase.classlike_infos.get(name) {
if let Some(enum_type) = &enum_info.enum_type {
type2_part = enum_type;
}
}
}
}
Expand Down

0 comments on commit 31c38b6

Please sign in to comment.