Skip to content

REPL imports not overriding predef #9720

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

Closed
mpilquist opened this issue Sep 4, 2020 · 1 comment · Fixed by #12303
Closed

REPL imports not overriding predef #9720

mpilquist opened this issue Sep 4, 2020 · 1 comment · Fixed by #12303
Assignees
Milestone

Comments

@mpilquist
Copy link
Contributor

mpilquist commented Sep 4, 2020

Minimized code

Using the develop branch of the fs2 repository and running sbt ;project coreJVM;console:

scala> import fs2.Stream

scala> Stream(1)                                                                                                                                                                
1 |Stream(1)
  |^^^^^^
  |getter Stream in package scala is deprecated since 2.13.0: Use LazyList instead of Stream
val res0: Stream[Int] = Stream(1, <not computed>)

scala> fs2.Stream(1)                                                                                                                                                            
val res1: fs2.Stream[fs2.Pure, Int] = Stream(..)

Despite the explicit import of fs2.Stream, the call to Stream(1) is resolved as a call to scala.Stream(1) instead of fs2.Stream(1).

@som-snytt
Copy link
Contributor

Related to #7635 where resolution is against the class path before repl history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants