Skip to content

Commit 5b7c3b8

Browse files
committed
rustc: Typecheck the base part of record extension expressions. Un-XFAIL rec-extend.rs.
1 parent 1a05f99 commit 5b7c3b8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,6 @@ TEST_XFAILS_RUSTC := $(addprefix test/run-pass/, \
479479
obj-dtor.rs \
480480
pred.rs \
481481
preempt.rs \
482-
rec-extend.rs \
483482
rt-circular-buffer.rs \
484483
size-and-align.rs \
485484
spawn-fn.rs \

src/comp/middle/typeck.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,13 @@ fn check_expr(&@fn_ctxt fcx, @ast.expr expr) -> @ast.expr {
20642064

20652065
case (ast.expr_rec(?fields, ?base, _)) {
20662066

2067-
auto base_1 = base;
2067+
auto base_1;
2068+
alt (base) {
2069+
case (none[@ast.expr]) { base_1 = none[@ast.expr]; }
2070+
case (some[@ast.expr](?b_0)) {
2071+
base_1 = some[@ast.expr](check_expr(fcx, b_0));
2072+
}
2073+
}
20682074

20692075
let vec[ast.field] fields_1 = vec();
20702076
let vec[field] fields_t = vec();

0 commit comments

Comments
 (0)