Skip to content

Commit 9ff6f81

Browse files
committed
Fix handling of loops and conditionals in alias.rs
It now threads information about invalidated aliases through the AST properly. This makes it more permissive for conditionals (invalidating an alias in one branch doesn't prevent you from using it in another), and less permissive for loops (it now properly notices when a loop invalidates an alias that it might still use in another iteration). Closes #1144
1 parent 81d9717 commit 9ff6f81

File tree

4 files changed

+169
-62
lines changed

4 files changed

+169
-62
lines changed

src/comp/driver/session.rs

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ obj session(targ_cfg: @config,
7676
codemap::emit_error(none, msg, parse_sess.cm);
7777
err_count += 1u;
7878
}
79+
fn has_errors() -> bool { err_count > 0u }
7980
fn abort_if_errors() {
8081
if err_count > 0u { self.fatal("aborting due to previous errors"); }
8182
}

0 commit comments

Comments
 (0)