Compare commits

..

No commits in common. "815176c8c785eeae6686d42f0b83df45d05e94b4" and "af5672020ef19b96353c31280355345bad9f57e1" have entirely different histories.

1 changed files with 3 additions and 1 deletions

View File

@ -556,7 +556,9 @@ 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_none()
|| methods.iter().any(|(s, _, _)| s == &"__init__".into()) {
return constructor.clone();
}
}