summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crates/rebel-lang/examples/repl.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/rebel-lang/examples/repl.rs b/crates/rebel-lang/examples/repl.rs
index b7b91ca..f2c714b 100644
--- a/crates/rebel-lang/examples/repl.rs
+++ b/crates/rebel-lang/examples/repl.rs
@@ -89,7 +89,9 @@ fn main() {
println!("Validation error: {err:?}");
continue;
}
- if let Err(err) = Type::ast_stmt_type(&ctx, &stmt) {
+
+ let mut typecheck_ctx = ctx.clone();
+ if let Err(err) = typecheck_ctx.record_type(&stmt) {
println!("Type error: {err:?}");
continue;
}