Compare commits
2 Commits
5d5ec52170
...
0b99241576
Author | SHA1 | Date |
---|---|---|
z78078 | 0b99241576 | |
z78078 | 3585ab9d06 |
|
@ -551,17 +551,18 @@ 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 {
|
||||
|
|
Loading…
Reference in New Issue