nac3artiq: update InnerResolver's "pyid_to_type" table if class contain constructor function #309

Merged
sb10q merged 7 commits from issue-139-2 into master 2022-07-28 19:18:36 +08:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 785c6bcbb0 - Show all commits

View File

@ -556,7 +556,7 @@ impl InnerResolver {
if let TopLevelDef::Class {
object_id, methods, constructor, ..
} = &*def.read() {
if object_id == def_id && !constructor.is_none() && methods.iter().any(|(s, _, _)| s == &"__init__".into()) {
if object_id == def_id && constructor.is_some() && methods.iter().any(|(s, _, _)| s == &"__init__".into()) {
return constructor.clone();
}
}