Closed IsaacShelton closed 3 years ago
After trying many things, the the headache of using namespace
and contextual names is just not worth it in my opinion.
A proper implementation of using namespace
would have to account for all of the following:
Also using namespace
as it was previously intended was broken and poorly implemented.
So using namespace
and other ways of having contextual names have been removed in 1bd44a96f59cae12c5150f1352cb8f1d9810baff
Namespaced types don't behave as expected when accessed via
using namespace
main.adept
other.adept
Probably somewhat related to #57
e.g. Something like this needs to be able to work
For something like this, namespace resolution rules will have to be so that "used" namespaces are tested before the global namespace, and then have parameter/argument types resolved before IRGEN stage.
All functions within the file will need to have their parameter types and return types (and for structs/unions: their field types, etc.) converted to match the global namespaced name of the type. So the above would be implicitly transformed into something like this: