Check that classes are instantiable

that is, check that there aren't any mutually recursive cycles between
classes and other types
This commit is contained in:
Tim Chevalier 2012-06-01 19:54:37 -07:00
parent 79787833bb
commit 14e3fdea9c

View file

@ -386,6 +386,8 @@ fn check_item(ccx: @crate_ctxt, it: @ast::item) {
};
// typecheck the members
for members.each {|m| check_class_member(class_ccx, class_t, m); }
// Check that the class is instantiable
check_instantiable(ccx.tcx, it.span, it.id);
}
ast::item_ty(t, tps, rp) {
let tpt_ty = ty::node_id_to_type(ccx.tcx, it.id);