Add type argument field to expr_path

This way, you can explicitly provide type parameters when calling a
generic method.

Issue #1227
This commit is contained in:
Marijn Haverbeke 2011-12-19 10:21:31 +01:00
parent 4d524b957f
commit 60acae4df7
13 changed files with 60 additions and 16 deletions

View file

@ -35,6 +35,7 @@ fn main() {
assert [1].len().str() == "1";
assert [3, 4].map({|a| a + 4})[0] == 7;
assert [3, 4].map::<uint>({|a| a as uint + 4u})[0] == 7u;
let x = 0u;
10u.times {|_n| x += 2u;}
assert x == 20u;