Skip to content

Commit

Permalink
Fix handling of loops and conditionals in alias.rs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
marijnh committed Nov 15, 2011
1 parent 81d9717 commit 9ff6f81
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 62 deletions.
1 change: 1 addition & 0 deletions src/comp/driver/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ obj session(targ_cfg: @config,
codemap::emit_error(none, msg, parse_sess.cm);
err_count += 1u;
}
fn has_errors() -> bool { err_count > 0u }
fn abort_if_errors() {
if err_count > 0u { self.fatal("aborting due to previous errors"); }
}
Expand Down
Loading

0 comments on commit 9ff6f81

Please sign in to comment.