aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lazy-init.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-08 07:33:25 -0700
committerGraydon Hoare <[email protected]>2010-07-08 07:33:25 -0700
commit115e14a32c1940a4868ae8633039a296450740ea (patch)
tree086b00f13564d4c4927d79acf390a8ac3f505fb3 /src/test/run-pass/lazy-init.rs
parentDoc tweak. (diff)
downloadrust-115e14a32c1940a4868ae8633039a296450740ea.tar.xz
rust-115e14a32c1940a4868ae8633039a296450740ea.zip
Some more typestate tests.
Diffstat (limited to 'src/test/run-pass/lazy-init.rs')
-rw-r--r--src/test/run-pass/lazy-init.rs13
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