-
Notifications
You must be signed in to change notification settings - Fork 1.1k
REPL: Import shadowing issue #5074
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
Comments
This has to do with the way we handle user defined imports and wrap expression in an object: When we evaluate an expression, we need to imports previously evaluated expressions: We first import the wrapper object and then the user defined imports in it. So a user defined import might shadow a definition even if the import precedes the definition |
this is a regression/change since Scala 2; all Scala 2 versions I tested print (you never know, but sometimes @som-snytt gets interested in these sort of problems...) |
there is some discussion and analysis on #14951. I wrote:
|
Today, it would be more natural to say that import makes symbols available in the current line, and export makes them available to subsequent lines. |
The text was updated successfully, but these errors were encountered: