diff options
| author | Graydon Hoare <[email protected]> | 2010-06-24 11:15:22 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-24 11:15:22 -0700 |
| commit | 0364a801bb29211d4731f3f910c7629286b51c45 (patch) | |
| tree | 2fb2a4eed938c03fc8259b292929154a5ce0d250 /src/test | |
| parent | Add fmt module, move out some common format helpers, add instruction-selectio... (diff) | |
| download | rust-0364a801bb29211d4731f3f910c7629286b51c45.tar.xz rust-0364a801bb29211d4731f3f910c7629286b51c45.zip | |
Clean up trans_alt_tag to use slots, not assume interior words. Also remove record-based destructuring (hard on eyes). Add execution parts to generic-tag-alt.rs and un-XFAIL it.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/generic-tag-alt.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/test/run-pass/generic-tag-alt.rs b/src/test/run-pass/generic-tag-alt.rs index 1fcf2c38..302096fb 100644 --- a/src/test/run-pass/generic-tag-alt.rs +++ b/src/test/run-pass/generic-tag-alt.rs @@ -1,9 +1,16 @@ type foo[T] = tag(arm(T)); fn altfoo[T](foo[T] f) { + auto hit = false; alt (f) { - case (arm(x)) {} + case (arm(x)) { + log "in arm"; + hit = true; + } } + check (hit); } -fn main() {} +fn main() { + altfoo[int](arm[int](10)); +} |