From 0364a801bb29211d4731f3f910c7629286b51c45 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 24 Jun 2010 11:15:22 -0700 Subject: 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. --- src/test/run-pass/generic-tag-alt.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/test') 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)); +} -- cgit v1.2.3