diff options
Diffstat (limited to 'crates/rebel-lang/src/typing.rs')
-rw-r--r-- | crates/rebel-lang/src/typing.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/rebel-lang/src/typing.rs b/crates/rebel-lang/src/typing.rs index 2af8d33..6bb0fb5 100644 --- a/crates/rebel-lang/src/typing.rs +++ b/crates/rebel-lang/src/typing.rs @@ -123,16 +123,16 @@ impl Type { }) } - pub fn ast_stmt_type(ctx: &Context, stmt: &ast::BodyStmt<'_>) -> Result<Type> { + pub fn ast_stmt_type(ctx: &Context, stmt: &ast::BlockStmt<'_>) -> Result<Type> { match stmt { - ast::BodyStmt::Assign { dest: _, expr } => { + ast::BlockStmt::Assign { dest: _, expr } => { // TODO: Assignability, dest type let dest_type = Type::Free; let expr_type = Self::ast_expr_type(ctx, expr)?; dest_type.unify(expr_type, Coerce::Assign) } - ast::BodyStmt::Expr { expr } => Self::ast_expr_type(ctx, expr), - ast::BodyStmt::Empty => Ok(Type::Unit), + ast::BlockStmt::Expr { expr } => Self::ast_expr_type(ctx, expr), + ast::BlockStmt::Empty => Ok(Type::Unit), } } |