+ # Check for useless double declarations
+ if serialize and up_serialize then
+ toolcontext.warning(node.location, "useless-serialize",
+ "Warning: superfluous use of `{text}`.")
+ else if noserialize and not up_serialize then
+ toolcontext.warning(node.location, "useless-noserialize",
+ "Warning: superfluous use of `{text}`.")
+ end
+ end
+ end
+
+ redef fun process_nclassdef(nclassdef)
+ do
+ if not nclassdef isa AStdClassdef then return
+
+ # Is there a declaration on the classdef or the module?
+ var serialize = nclassdef.is_serialize
+
+ if not serialize and not nclassdef.is_noserialize then
+ # Is the module marked serialize?
+ serialize = nclassdef.parent.as(AModule).is_serialize
+ end