Signed-off-by: Jean Privat <jean@pryen.org>
error(aimport.n_visibility, "Error: only properties can be protected.")
return
end
+ if sup == mmodule then
+ error(aimport.n_name, "Error: Dependency loop in module {mmodule}.")
+ end
+ if sup.in_importation < mmodule then
+ error(aimport.n_name, "Error: Dependency loop between modules {mmodule} and {sup}.")
+ return
+ end
mmodule.set_visibility_for(sup, mvisibility)
end
if stdimport then