Compare commits

..

No commits in common. "0b992415763d1b97affb3ea6df979f864a8bc87a" and "5d5ec5217065feadd28053b7b9e5c59eaa536282" have entirely different histories.

1 changed files with 10 additions and 11 deletions

View File

@ -551,18 +551,17 @@ impl InnerResolver {
let constructor_ty = pyid_to_def
.get(&py_obj_id)
.and_then(|def_id| {
defs
.iter()
.find_map(|def| {
if let TopLevelDef::Class {
object_id, methods, constructor, ..
} = &*def.read() {
if object_id == def_id && constructor.is_some() && methods.iter().any(|(s, _, _)| s == &"__init__".into()) {
return constructor.clone();
defs.iter()
.find_map(|def| {
if let TopLevelDef::Class {
object_id, methods, constructor, ..
} = &*def.read() {
if object_id == def_id && constructor.is_some() && methods.iter().any(|(s, _, _)| s == &"__init__".into()) {
return constructor.clone();
}
}
}
None
})
None
})
});
if let Some(ty) = constructor_ty {