Skip to content

Commit 7cbf1b2

Browse files
committed
fix type check for sub type
1 parent 0634930 commit 7cbf1b2

File tree

1 file changed

+2
-5
lines changed
  • crates/code_analysis/src/semantic/type_compact

1 file changed

+2
-5
lines changed

crates/code_analysis/src/semantic/type_compact/mod.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,8 @@ fn infer_custom_type_compact(
262262
_ => return Some(false),
263263
};
264264

265-
let supers = db.get_type_index().get_super_types(compact_id)?;
266-
for compact_super in supers {
267-
if infer_custom_type_compact(db, config, type_id, &compact_super, infer_guard)? {
268-
return Some(true);
269-
}
265+
if is_sub_type_of(db, compact_id, type_id) {
266+
return Some(true);
270267
}
271268
}
272269

0 commit comments

Comments
 (0)