Resolver - Resolve superclasses

This commit is contained in:
Emmanuel BENOîT 2023-01-15 17:59:37 +01:00
parent 6b384cda5d
commit 453d243b91

View file

@ -383,6 +383,9 @@ impl VarResolver for StmtNode {
StmtNode::ClassDecl(decl) => {
rs.declare(&decl.name, SymKind::Class)?;
if let Some(superclass) = &decl.superclass {
rs.resolve_use(superclass)?;
}
rs.define(&decl.name);
rs.with_scope(|rs| resolve_class(rs, &decl.members), rs.current_type())
}