We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0341d7 commit 7d3cec6Copy full SHA for 7d3cec6
crates/ty_python_semantic/src/types.rs
@@ -7215,13 +7215,10 @@ impl<'db> Type<'db> {
7215
instance.find_legacy_typevars_impl(db, binding_context, typevars, visitor);
7216
}
7217
7218
- Type::NewTypeInstance(newtype) => {
7219
- newtype.base_class_type(db).find_legacy_typevars_impl(
7220
- db,
7221
- binding_context,
7222
- typevars,
7223
- visitor,
7224
- );
+ Type::NewTypeInstance(_) => {
+ // A newtype can never be constructed from an unspecialized generic class, so it is
+ // impossible that we could ever find any legacy typevars in a newtype instance or
+ // its underlying class.
7225
7226
7227
Type::SubclassOf(subclass_of) => {
0 commit comments