feat: support recursive class definition

This commit is contained in:
Shunsuke Shibayama 2023-08-25 21:02:47 +09:00
parent 418f31e6ed
commit f3b188e095
13 changed files with 285 additions and 93 deletions

View file

@ -256,7 +256,7 @@ impl ASTLowerer {
None,
);
let mut module = hir::Module::with_capacity(ast.module.len());
if let Err(errs) = self.module.context.preregister(ast.module.block()) {
if let Err(errs) = self.module.context.register_const(ast.module.block()) {
self.errs.extend(errs);
}
for chunk in ast.module.into_iter() {