Closed sol-vin closed 2 months ago
This seems to work as expected. include A
makes all features in A
available in the parent namespace. A private
macro is still visible from the same namespace, so it makes sense that you can call it after include A
.
Note that the visibility of test
does not change. Calling it from a different namespace is still prohibited.
module A
private macro test(t)
{% puts "HI #{t}" %}
end
end
module B
include A
test(2)
end
B.test(3) # Error: private macro 'test' called for B
Ah, my bad, closed
Issue:
Using
include
with amodule
that has aprivate macro
exposes themacro
publiclyCode:
throws an
Error: private macro 'test' called for A
Produces:
What it should do:
Throw an
Error: private macro 'test' called for A