mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 15:14:19 -05:00
[ty] Use 'unknown' specialization for upper bound on Self (#20325)
## Summary closes https://github.com/astral-sh/ty/issues/1156 ## Test Plan Added a regression test
This commit is contained in:
@@ -5711,9 +5711,7 @@ impl<'db> Type<'db> {
|
||||
],
|
||||
});
|
||||
};
|
||||
let instance = Type::ClassLiteral(class).to_instance(db).expect(
|
||||
"nearest_enclosing_class must return type that can be instantiated",
|
||||
);
|
||||
let instance = Type::instance(db, class.unknown_specialization(db));
|
||||
let class_definition = class.definition(db);
|
||||
let typevar = TypeVarInstance::new(
|
||||
db,
|
||||
|
||||
Reference in New Issue
Block a user