-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it forbidden to use an object by FQN? #537
Comments
@yegor256 By the way, the use of FQN there can introduce some ambiguity: For example:
Can we determine at the parsing stage that But such ambiguity is not very good, since reading the code it will not be clear what it is, a property or an object inside the package. |
@yegor256 In general, I don't see much point in allowing FQN to be used in such places, if the user wants to use the object, they must first import it explicitly. If this is described in a formal description, then, it seems to me, everything will be fine. |
@i582 we have to make "packages" also objects. Thus, |
@rultor release, tag is |
@i582 now it's possible to do this:
|
I am trying to compile a small script:
But I get the error:
It turns out that I cannot use the object by its FQN? That is, I always need to write
+alias ...
at the beginning if it is an object not from the current package?Also, if you write FQN in the first identifier for the alias:
And then try to use it, you will get the same error.
I think it's worth adding this to the formal language description so that users don't have a question in the future.
The text was updated successfully, but these errors were encountered: