From e813388df8df90d0db658e1e745a0a8a4d27ad8c Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 6 Jul 2010 23:18:29 -0700 Subject: Numerous bug fixes to typestate algorithm. --- src/test/compile-fail/use-uninit.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/compile-fail/use-uninit.rs (limited to 'src/test') 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 -- cgit v1.2.3