Merge branch 'issue-139-2' of git.m-labs.hk:M-Labs/nac3 into issue-139-2

This commit is contained in:
z78078 2022-07-22 12:01:44 +08:00
commit 785c6bcbb0
1 changed files with 1 additions and 1 deletions

View File

@ -556,7 +556,7 @@ impl InnerResolver {
if let TopLevelDef::Class { if let TopLevelDef::Class {
object_id, methods, constructor, .. object_id, methods, constructor, ..
} = &*def.read() { } = &*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(); return constructor.clone();
} }
} }