Skip to content

Lambda fixups #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 25, 2011
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a test that tests typestate checking inside of fn exprs.
  • Loading branch information
msullivan committed Jun 24, 2011
commit 4499ebe858c9e1cf61e12f6735d88a49b56bfd13
11 changes: 11 additions & 0 deletions src/test/compile-fail/fn-expr-type-state.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// error-pattern:Unsatisfied precondition
// xfail-stage0

fn main() {
// Typestate should work even in a lambda. we should reject this program.
auto f = fn () -> int {
let int i;
ret i;
};
log_err f();
}