Resolver - Resolve superclasses
This commit is contained in:
parent
6b384cda5d
commit
453d243b91
1 changed files with 3 additions and 0 deletions
|
@ -383,6 +383,9 @@ impl VarResolver for StmtNode {
|
||||||
|
|
||||||
StmtNode::ClassDecl(decl) => {
|
StmtNode::ClassDecl(decl) => {
|
||||||
rs.declare(&decl.name, SymKind::Class)?;
|
rs.declare(&decl.name, SymKind::Class)?;
|
||||||
|
if let Some(superclass) = &decl.superclass {
|
||||||
|
rs.resolve_use(superclass)?;
|
||||||
|
}
|
||||||
rs.define(&decl.name);
|
rs.define(&decl.name);
|
||||||
rs.with_scope(|rs| resolve_class(rs, &decl.members), rs.current_type())
|
rs.with_scope(|rs| resolve_class(rs, &decl.members), rs.current_type())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue