Update our code to new type parameter kind syntax

Closes #1067
This commit is contained in:
Marijn Haverbeke 2011-10-25 15:56:55 +02:00
parent 58c82a8da2
commit cfdf193c46
94 changed files with 289 additions and 288 deletions

View file

@ -75,7 +75,7 @@ fn map_expr(cx: ctx, ex: @expr) {
cx.map.insert(ex.id, node_expr(ex));
}
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);
@ -86,13 +86,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>,
key_idx: fn(K) -> uint,
idx_key: fn(uint) -> K) {
obj adapter<K, V>(map: smallintmap::smallintmap<V>,
key_idx: fn(K) -> uint,
idx_key: fn(uint) -> K) {
fn size() -> uint { fail }