diff options
| author | Patrick Walton <[email protected]> | 2011-02-25 12:37:03 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-02-25 13:44:08 -0800 |
| commit | 7a1d01effcfa5763bc62aefba40f67ad2130d28d (patch) | |
| tree | 2e26bf45352b71d1e618f359bf388beae354fb21 /src/test | |
| parent | Pass the abi of native functions all the way to codegen. (diff) | |
| download | rust-7a1d01effcfa5763bc62aefba40f67ad2130d28d.tar.xz rust-7a1d01effcfa5763bc62aefba40f67ad2130d28d.zip | |
rustc: Push type parameters down through alt tag patterns; add a test
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/generic-tag-box-alt.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/run-pass/generic-tag-box-alt.rs b/src/test/run-pass/generic-tag-box-alt.rs new file mode 100644 index 00000000..2727885a --- /dev/null +++ b/src/test/run-pass/generic-tag-box-alt.rs @@ -0,0 +1,19 @@ +tag foo[T] { + arm(@T); +} + +fn altfoo[T](foo[T] f) { + auto hit = false; + alt (f) { + case (arm[T](?x)) { + log "in arm"; + hit = true; + } + } + check (hit); +} + +fn main() { + altfoo[int](arm[int](@10)); +} + |