Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
osa1 committed Sep 21, 2024
1 parent 329ce99 commit d26718e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/monomorph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,14 @@ fn mono_expr(
ast::Expr::Char(*char)
}

ast::Expr::Constr(_) | ast::Expr::Self_ => expr.clone(),
ast::Expr::Constr(constr) => {
let ty_decl = poly_pgm.ty.get(constr).unwrap();
let mono_constr = mono_ty_decl(ty_decl, &[], poly_pgm, mono_pgm);
debug_assert_eq!(&mono_constr, constr);
ast::Expr::Constr(mono_constr)
}

ast::Expr::Self_ => ast::Expr::Self_,

ast::Expr::Call(ast::CallExpr { fun, args }) => ast::Expr::Call(ast::CallExpr {
fun: mono_bl_expr(fun, ty_map, poly_pgm, mono_pgm),
Expand Down

0 comments on commit d26718e

Please sign in to comment.