mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Merge remote-tracking branch 'upstream/MAIN' into early-return-if-else
This commit is contained in:
commit
e82dd43465
28 changed files with 761 additions and 1087 deletions
|
@ -1209,8 +1209,20 @@ pub fn canonicalize_expr<'a>(
|
|||
output,
|
||||
)
|
||||
}
|
||||
ast::Expr::Dbg | ast::Expr::DbgStmt(_, _) => {
|
||||
internal_error!("Dbg should have been desugared by now")
|
||||
ast::Expr::Dbg => {
|
||||
// Dbg was not desugared as either part of an `Apply` or a `Pizza` binop, so it's
|
||||
// invalid.
|
||||
env.problem(Problem::UnappliedDbg { region });
|
||||
|
||||
let invalid_dbg_expr = crate::desugar::desugar_invalid_dbg_expr(env, scope, region);
|
||||
|
||||
let (loc_expr, output) =
|
||||
canonicalize_expr(env, var_store, scope, region, invalid_dbg_expr);
|
||||
|
||||
(loc_expr.value, output)
|
||||
}
|
||||
ast::Expr::DbgStmt(_, _) => {
|
||||
internal_error!("DbgStmt should have been desugared by now")
|
||||
}
|
||||
ast::Expr::LowLevelDbg((source_location, source), message, continuation) => {
|
||||
let mut output = Output::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue