I have no idea what I'm doing, I have paws, but I fixed it.
Enable allowDuplicates for namespace symbols, so you can declare multiple namespaces with the same name. No more "redefinition" error.
Reuse the NamespaceBinder of the first namespace with the current name, so you can share methods between all scopes.
When lookup namespace container use the Last one, because it has all members. So don't report "ambiguous" error in that case.
Don't extrapolate function lookup to the upper scope for a qualified name, like invoke Shading::Decals::foo but get Shading::foo. Actually we need to check members in the container only, not in the whole binder tree.
Lots of tests for the namespace behavior. Correlates with the latest DXC release.
Known issues:
I don't touch anything with struct, enum scopes. Probably it has similar issues.
Don't use nested namespaces with the same name, like namespace Shading { namespace Shading {} } it doesn't work properly.
I have no idea what I'm doing, I have paws, but I fixed it.
allowDuplicates
for namespace symbols, so you can declare multiple namespaces with the same name. No more "redefinition" error.NamespaceBinder
of the first namespace with the current name, so you can share methods between all scopes.Shading::Decals::foo
but getShading::foo
. Actually we need to check members in the container only, not in the whole binder tree.Known issues: I don't touch anything with
struct
,enum
scopes. Probably it has similar issues. Don't use nested namespaces with the same name, likenamespace Shading { namespace Shading {} }
it doesn't work properly.example