diff options
| author | Graydon Hoare <[email protected]> | 2010-07-06 23:18:29 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-06 23:18:29 -0700 |
| commit | e813388df8df90d0db658e1e745a0a8a4d27ad8c (patch) | |
| tree | 7920e0bc4d38fdb418c452388afda0e4b6f55f63 /src/test | |
| parent | Correct flow-graph wiring for STMT_if. (diff) | |
| download | rust-e813388df8df90d0db658e1e745a0a8a4d27ad8c.tar.xz rust-e813388df8df90d0db658e1e745a0a8a4d27ad8c.zip | |
Numerous bug fixes to typestate algorithm.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/use-uninit.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/compile-fail/use-uninit.rs b/src/test/compile-fail/use-uninit.rs new file mode 100644 index 00000000..5790bfbd --- /dev/null +++ b/src/test/compile-fail/use-uninit.rs @@ -0,0 +1,14 @@ +// error-pattern:Unsatisfied precondition + +fn foo(int x) { + log x; +} + +fn main() { + let int x; + if (1 > 2) { + x = 10; + } else { + } + foo(x); +}
\ No newline at end of file |