diff --git a/src/monomorph.rs b/src/monomorph.rs index 4f7ecc8..c046dcb 100644 --- a/src/monomorph.rs +++ b/src/monomorph.rs @@ -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),