Skip to content

Commit 09d3e44

Browse files
committed
---
yaml --- r: 7880 b: refs/heads/snap-stage3 c: 53dbde6 h: refs/heads/master v: v3
1 parent c6a3592 commit 09d3e44

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 3321880f1304943a87f3b9756de642417eb82d1b
4+
refs/heads/snap-stage3: 53dbde6cc2aabbf44bf75aea1eecad5729396081
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/comp/middle/typeck.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,9 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
22972297
let msg = #fmt["attempted access of field %s on type %s, but \
22982298
no method implementation was found",
22992299
field, ty_to_str(tcx, t_err)];
2300-
tcx.sess.span_fatal(expr.span, msg);
2300+
tcx.sess.span_err(expr.span, msg);
2301+
// NB: Adding a bogus type to allow typechecking to continue
2302+
write::ty_only_fixup(fcx, id, ty::mk_nil(tcx));
23012303
}
23022304
}
23032305
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Check that bogus field access is non-fatal
2+
fn main() {
3+
let x = 0;
4+
log(debug, x.foo); //! ERROR attempted access of field
5+
log(debug, x.bar); //! ERROR attempted access of field
6+
}

0 commit comments

Comments
 (0)