Skip to content

Commit 99901bd

Browse files
committed
Add FIXMEs around type handling in trans_if, trans_alt
1 parent 21fb49a commit 99901bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/comp/middle/trans.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,6 +3086,7 @@ fn trans_if(@block_ctxt cx, @ast.expr cond,
30863086

30873087
// If we have an else expression, then the entire
30883088
// if expression can have a non-nil type.
3089+
// FIXME: This isn't quite right, particularly re: dynamic types
30893090
auto expr_ty = ty.expr_ty(elexpr);
30903091
if (ty.type_has_dynamic_size(expr_ty)) {
30913092
expr_llty = T_typaram_ptr(cx.fcx.ccx.tn);
@@ -3576,6 +3577,7 @@ fn trans_alt(@block_ctxt cx, @ast.expr expr,
35763577
auto default_res = trans_fail(default_cx, expr.span,
35773578
"non-exhaustive match failure");
35783579

3580+
// FIXME: This isn't quite right, particularly re: dynamic types
35793581
auto expr_ty = ty.ann_to_type(ann);
35803582
auto expr_llty;
35813583
if (ty.type_has_dynamic_size(expr_ty)) {

0 commit comments

Comments
 (0)