# Build MM entity from NIT AST and check conformance of these entities.
# This module introduce specific MM class (MMSrcXXX) that specialize the abstract one from metamodel
#
-package mmbuilder
+module mmbuilder
import syntax_base
private import primitive_info
var local_class: MMSrcLocalClass
var mod = v.mmmodule
var local_classes = mod.src_local_classes
- if (local_classes.has_key(name)) then
+ if local_classes.has_key(name) then
local_class = local_classes[name]
_local_class = local_class
if self isa AStdClassdef 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}.")
+ v.error(self, "Redef error: Expected {isrt}, as in {ip.local_class}::{ip}.")
end
end
var clos = new MMClosure(name, sig, n_kwbreak != null, n_expr != null)
for c in old_signature_builder.closure_decls do
if c.n_id.to_symbol == name then
- v.error(n_id, "A closure '!{name}' already defined at {c.n_id.location.relative_to(n_id.location)}.")
+ v.error(n_id, "Error: A closure '!{name}' already defined at {c.n_id.location.relative_to(n_id.location)}.")
return
end
end