diff options
| author | Patrick Walton <[email protected]> | 2010-08-26 14:45:58 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-08-26 14:47:18 -0700 |
| commit | a7eeeb596a9aa0660e6e3f8cff92876ac1686007 (patch) | |
| tree | 5d8e1a5a1131a58b354536b6e0925ab4cd74825f /src/test | |
| parent | When copying function values, null out the destination's binding iff the sour... (diff) | |
| download | rust-a7eeeb596a9aa0660e6e3f8cff92876ac1686007.tar.xz rust-a7eeeb596a9aa0660e6e3f8cff92876ac1686007.zip | |
Add automatic parameter instantiation. Closes #45.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/auto-instantiate.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/run-pass/auto-instantiate.rs b/src/test/run-pass/auto-instantiate.rs new file mode 100644 index 00000000..58e20e1d --- /dev/null +++ b/src/test/run-pass/auto-instantiate.rs @@ -0,0 +1,11 @@ +// -*- rust -*- + +fn f[T,U](&T x, &U y) -> tup(T,U) { + ret tup(x, y); +} + +fn main() -> () { + log f(tup(3, 4, 5), 4)._0._0; + log f(5, 6)._0; +} + |