[ty] Exhaustiveness checking for generic classes (#21726)
## Summary We had tests for this already, but they used generic classes that were bivariant in their type parameter, and so this case wasn't captured. closes https://github.com/astral-sh/ty/issues/1702 ## Test Plan Updated Markdown tests
This commit is contained in:
@@ -336,6 +336,7 @@ fn pattern_kind_to_type<'db>(db: &'db dyn Db, kind: &PatternPredicateKind<'db>)
|
||||
infer_expression_type(db, *class_expr, TypeContext::default())
|
||||
.to_instance(db)
|
||||
.unwrap_or(Type::Never)
|
||||
.top_materialization(db)
|
||||
} else {
|
||||
Type::Never
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user