Check that type parameter bounds are interface types

Issue #1227
This commit is contained in:
Marijn Haverbeke 2011-12-29 11:23:35 +01:00
parent 7ea175f23f
commit 40d5f288c3
6 changed files with 96 additions and 45 deletions

View file

@ -129,11 +129,8 @@ fn item_ty_param_bounds(item: ebml::doc, this_cnum: ast::crate_num,
fn item_ty_param_count(item: ebml::doc) -> uint {
let n = 0u;
ebml::tagged_docs(item, tag_items_data_item_ty_param_bounds) {|p|
for byte in ebml::doc_data(p) {
if byte as char == '.' { n += 1u; }
}
}
ebml::tagged_docs(item, tag_items_data_item_ty_param_bounds,
{|_p| n += 1u; });
n
}