return false
end
end
+
+ if closures.length != s.closures.length then return false
+ for i in [0..closures.length[ do
+ if not s.closures[i] < closures[i] then return false
+ end
return true
end
return self
end
end
+
+ meth <(c: MMClosure): Bool
+ do
+ if c.is_optional and not is_optional then return false
+ if not c.is_break and is_break then return false
+ return c.signature < signature
+ end
end
# Inheritance relation between two types
end
s = isig
prop.signature = s
+ #print "s is null"
end
+ var nberr = v.tc.error_count
+ #print "Check {prop.local_class}::{prop}{s} vs {ip.local_class}::{ip}{isig}"
+ #print "s={s.object_id} isig={isig.object_id} isigorig={i.signature.object_id}"
+
#print "orig signature: {i.signature.recv} . {i.signature}"
#print "inh signature: {isig.recv} . {isig}"
#print "redef signature: {s.recv} . {s}"
v.error(self, "Redef error: The function {prop.local_class}::{prop} redefines the procedure {ip.local_class}::{ip}.")
else if srt != null and isrt != null and not srt < isrt then
v.error(self, "Redef error: Expected {isrt} (as in {ip.local_class}::{ip}), got {srt} in {prop.local_class}::{prop}.")
+ else if not s < isig and nberr == v.tc.error_count then
+ # Systematic fallback for conformance check
+ v.error(self, "Redef error: Incompatible redefinition of {ip.local_class}::{ip} with {prop.local_class}::{prop}")
else if srt != null and isrt != null and srt != isrt and prop isa MMAttribute then
# FIXME: To remove
v.warning(self, "Redef warning: Expected {isrt} (as in {ip.local_class}::{ip}), got {srt} in {prop.local_class}::{prop}.")