Commit 5a835f4e authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

detect interface prerequisite cycle

2007-09-09  Juerg Billeter  <j@bitron.ch>

	* vala/valasymbolresolver.vala: detect interface prerequisite cycle

svn path=/trunk/; revision=599
parent 97b6924a
2007-09-09 Jürg Billeter <j@bitron.ch>
* vala/valasymbolresolver.vala: detect interface prerequisite cycle
2007-09-09 Jürg Billeter <j@bitron.ch>
* vala/valaclass.vala, vala/valainterface.vala,
......
......@@ -90,6 +90,14 @@ public class Vala.SymbolResolver : CodeVisitor {
iface.accept_children (this);
foreach (TypeReference type in iface.get_prerequisites ()) {
if (type.data_type.is_subtype_of (iface)) {
iface.error = true;
Report.error (type.source_reference, "Prerequisite cycle (`%s' and `%s')".printf (iface.get_full_name (), type.data_type.get_full_name ()));
return;
}
}
current_scope = current_scope.parent_scope;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment