diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-28 13:07:05 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-28 13:07:52 -0700 |
| commit | 28459ca0eb8ae716d014fbf8b33a90f204dc7a9d (patch) | |
| tree | 60add1ddba3293b4d6e2f874dded3c1494fbb830 /src/test/compile-fail/and-init.rs | |
| parent | a7c4c19d4bea6d84f63709218146f7be76d5c9f2 (diff) | |
| download | rust-28459ca0eb8ae716d014fbf8b33a90f204dc7a9d.tar.gz rust-28459ca0eb8ae716d014fbf8b33a90f204dc7a9d.zip | |
Handle lazy binops properly in typestate
The typestate analysis now reflects that the second operand of a logical and or or may not be evaluated.
Diffstat (limited to 'src/test/compile-fail/and-init.rs')
| -rw-r--r-- | src/test/compile-fail/and-init.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/compile-fail/and-init.rs b/src/test/compile-fail/and-init.rs new file mode 100644 index 00000000000..7fa9c543557 --- /dev/null +++ b/src/test/compile-fail/and-init.rs @@ -0,0 +1,9 @@ +// xfail-stage0 +// error-pattern: Unsatisfied precondition constraint (for example, init(i + +fn main() { + let int i; + + log (false && {i = 5; true}); + log i; +} \ No newline at end of file |
