then a reference to suffix foo should resolve to my.foo (since it's prioritized over indirect dependencies).
And it does:
something = foo + foo -- resolves to my.foo
Unless my.foo is also bound in the file:
my.foo = ...
something = foo + foo -- ambiguous
This is because the suffix foo matches one thing in the file (my.foo) and one thing in the namespace-shadowed-by-file (lib.dep.lib.dep.foo). The name binding logic should note that here too one name should be prioritized over the other.
If your namespace contains
then a reference to suffix
foo
should resolve tomy.foo
(since it's prioritized over indirect dependencies).And it does:
Unless
my.foo
is also bound in the file:This is because the suffix
foo
matches one thing in the file (my.foo
) and one thing in the namespace-shadowed-by-file (lib.dep.lib.dep.foo
). The name binding logic should note that here too one name should be prioritized over the other.