diff options
| author | Graydon Hoare <[email protected]> | 2010-07-08 07:33:25 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-08 07:33:25 -0700 |
| commit | 115e14a32c1940a4868ae8633039a296450740ea (patch) | |
| tree | 086b00f13564d4c4927d79acf390a8ac3f505fb3 /src/test/run-pass | |
| parent | Doc tweak. (diff) | |
| download | rust-115e14a32c1940a4868ae8633039a296450740ea.tar.xz rust-115e14a32c1940a4868ae8633039a296450740ea.zip | |
Some more typestate tests.
Diffstat (limited to 'src/test/run-pass')
| -rw-r--r-- | src/test/run-pass/lazy-init.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/run-pass/lazy-init.rs b/src/test/run-pass/lazy-init.rs new file mode 100644 index 00000000..986dbf20 --- /dev/null +++ b/src/test/run-pass/lazy-init.rs @@ -0,0 +1,13 @@ +fn foo(int x) { + log x; +} + +fn main() { + let int x; + if (1 > 2) { + x = 12; + } else { + x = 10; + } + foo(x); +}
\ No newline at end of file |