Resolver - Apply resolution to methods

This commit is contained in:
Emmanuel BENOîT 2023-01-09 07:22:15 +01:00
parent 16bf06c7a1
commit 392aaa630d

View file

@ -265,7 +265,12 @@ impl VarResolver for StmtNode {
StmtNode::ClassDecl(decl) => {
rs.declare(&decl.name, SymKind::Class)?;
rs.define(&decl.name);
Ok(())
decl.methods
.iter()
.map(|method| {
rs.with_scope(|rs| resolve_function(rs, &method.params, &method.body))
})
.collect()
}
StmtNode::If {