diff options
| author | Graydon Hoare <[email protected]> | 2011-03-07 18:13:39 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-07 18:13:56 -0800 |
| commit | 0d60918855aefde24ee8d72238b167ef1b09628b (patch) | |
| tree | b635665cb95aea7665a04223ec4c64135fc5cdd9 /src/test/run-pass/generic-bind.rs | |
| parent | rustc: Cast dynamically-sized tags in iter_structural_ty_full() to opaque tag... (diff) | |
| download | rust-0d60918855aefde24ee8d72238b167ef1b09628b.tar.xz rust-0d60918855aefde24ee8d72238b167ef1b09628b.zip | |
Most of the way through genericizing bind properly with new malloc path. Still getting the thunk call wrong.
Diffstat (limited to 'src/test/run-pass/generic-bind.rs')
| -rw-r--r-- | src/test/run-pass/generic-bind.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/run-pass/generic-bind.rs b/src/test/run-pass/generic-bind.rs index 61085eb5..5f44bcee 100644 --- a/src/test/run-pass/generic-bind.rs +++ b/src/test/run-pass/generic-bind.rs @@ -3,6 +3,11 @@ fn id[T](&T t) -> T { } fn main() { - auto f = bind id[int](_); - check (f(10) == 10); + auto t = tup(1,2,3,4,5,6,7); + check (t._5 == 6); + // FIXME: this needs to work. + // auto f0 = bind id[tup(int,int,int,int,int,int,int)](t); + auto f1 = bind id[tup(int,int,int,int,int,int,int)](_); + // check (f0()._5 == 6); + check (f1(t)._5 == 6); } |