mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
if (try foo) was handled incorrectly inside a defer.
This commit is contained in:
@@ -372,7 +372,14 @@ Expr *copy_expr(CopyStruct *c, Expr *source_expr)
|
||||
}
|
||||
else
|
||||
{
|
||||
MACRO_COPY_DECL(expr->try_unwrap_expr.decl);
|
||||
if (expr->try_unwrap_expr.optional)
|
||||
{
|
||||
MACRO_COPY_DECL(expr->try_unwrap_expr.decl);
|
||||
}
|
||||
else
|
||||
{
|
||||
fixup_decl(c, &expr->try_unwrap_expr.decl);
|
||||
}
|
||||
}
|
||||
}
|
||||
return expr;
|
||||
|
||||
Reference in New Issue
Block a user