Port the compiler to foo<T> decl syntax.

This commit is contained in:
Erick Tryzelaar 2011-08-12 06:36:51 -07:00 committed by Graydon Hoare
parent 4c9049c50c
commit 4abc471390
20 changed files with 77 additions and 77 deletions

View file

@ -48,7 +48,7 @@ fn map_expr(map: &map, ex: &@expr, e: &(), v: &vt<()>) {
visit::visit_expr(ex, e, v);
}
fn new_smallintmap_int_adapter[@V]() -> std::map::hashmap<int, V> {
fn new_smallintmap_int_adapter<@V>() -> std::map::hashmap<int, V> {
let key_idx = fn (key: &int) -> uint { key as uint };
let idx_key = fn (idx: &uint) -> int { idx as int };
ret new_smallintmap_adapter(key_idx, idx_key);
@ -59,13 +59,13 @@ fn new_smallintmap_int_adapter[@V]() -> std::map::hashmap<int, V> {
// the entire codebase adapting all the callsites to the different
// interface.
// FIXME: hashmap and smallintmap should support the same interface.
fn new_smallintmap_adapter[@K,
@V](key_idx: fn(&K) -> uint ,
fn new_smallintmap_adapter<@K,
@V>(key_idx: fn(&K) -> uint ,
idx_key: fn(&uint) -> K ) ->
std::map::hashmap<K, V> {
obj adapter[@K,
@V](map: smallintmap::smallintmap<V>,
obj adapter<@K,
@V>(map: smallintmap::smallintmap<V>,
key_idx: fn(&K) -> uint ,
idx_key: fn(&uint) -> K ) {