diff options
| author | Graydon Hoare <[email protected]> | 2011-04-19 16:52:59 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-19 16:53:12 -0700 |
| commit | d1b9ddc8d49744a4e7e478e775d02d071dbd78a4 (patch) | |
| tree | 770ede20366096233245c4e348f86bbfab27d780 /src/test | |
| parent | rustc: Cache the results of type_of() (diff) | |
| download | rust-d1b9ddc8d49744a4e7e478e775d02d071dbd78a4.tar.xz rust-d1b9ddc8d49744a4e7e478e775d02d071dbd78a4.zip | |
Add testcase for bootstrap blocker and fix for each result type to nil.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/alt-phi.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/run-pass/alt-phi.rs b/src/test/run-pass/alt-phi.rs new file mode 100644 index 00000000..607a434a --- /dev/null +++ b/src/test/run-pass/alt-phi.rs @@ -0,0 +1,22 @@ +tag thing { a; b; c; } + +iter foo() -> int { + put 10; +} + +fn main() { + auto x = true; + alt (a) { + case (a) { + x = true; + for each (int i in foo()) { + } + } + case (b) { + x = false; + } + case (c) { + x = false; + } + } +} |