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:
parent
79787833bb
commit
14e3fdea9c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user