diff --git a/src/ttype/type_comparator/atomic_type_comparator.rs b/src/ttype/type_comparator/atomic_type_comparator.rs index a244f341..b36b322e 100644 --- a/src/ttype/type_comparator/atomic_type_comparator.rs +++ b/src/ttype/type_comparator/atomic_type_comparator.rs @@ -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; + } } } }