-
Notifications
You must be signed in to change notification settings - Fork 1.1k
REPL should prefer REPL products #7635
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 bitten me as well, in a different (and perhaps likelier-to-occur) form, involving a directory instead of a % mkdir foo
% dotr
Starting dotty REPL...
scala> def foo = 3
def foo: Int
scala> foo
1 |foo
|^^^
|package foo is not a value This is rather difficult to troubleshoot if you don't think to go look in the filesystem for an explanation! |
The related issue drives one "nuts, nuts, nuts".
Same for Arguably, a package cannot be empty. The spec says, "packages are not introduced by a definition" but by that charmingly awkward phrase, "packagings." What a prescient formulation. A package exists only by virtue of packaging something. It would also be nice if the all-knowing REPL explained all shadowings. Maybe not even a command called
|
The problem is that a REPL definition doesn't shadow a definition on the class path.
Edit: see below,
|
number of days since I was bitten by this: 0
but only because:
@nicolasstucki I don't understand why this issue was closed, actually? the issue doesn't seem fixed to me, as seen above |
Yeah I was just bitten by this exact thing in the exact same way. The Scala 2 behavior seems better to me. |
The purpose of this bug is to move all those |
I took a look at the linked PR, but it went over my head. I assume it is testing something subtle that only smart people can perceive, like dog whistles or sexism if you're of a certain gender or classism if you're of a certain class or just prefer FP over OOP. Arguably, "Functions are first-class objects" is classist as well as objectifying. |
This is still broken on 3.0.1-RC1-bin-SNAPSHOT-git-89e57aa (it was never actually fixed). I took a look while working on #12303 and I believe there are (at least) two separate issues here:
I believe the first issue is the easier of the two to fix (I have some WIP around here somewhere that appears to do so). |
Also note that the example above using |
Thanks for pointing out the change in |
minimized code
expectation
The text was updated successfully, but these errors were encountered: