-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Compiler version
3.0.0-RC3
Minimized code
scala> import fs2.Stream
scala> Stream.emit(1)
1 |Stream.emit(1)
|^^^^^^^^^^^
|value emit is not a member of object scala.collection.immutable.Stream - did you mean Stream.empty?
Expectation
On import, fs2.Stream
should shadow/hide scala.collection.immutable.Stream
Note that this works as expected in Scala 2:
# scala 2.13.5
scala> import fs2.Stream
import fs2.Stream
scala> Stream.emit(1)
val res0: fs2.Stream[[x]fs2.Pure[x],Int] = Stream(..)
I tried to hide scala.collection.immutable.Stream
explicitly, but this failed as well:
# scala 3.0.0-RC3
scala> import scala.collection.immutable.{Stream => _}
scala> import fs2.Stream
scala> Stream.emit(1)
1 |Stream.emit(1)
|^^^^^^^^^^^
|value emit is not a member of object scala.collection.immutable.Stream - did you mean Stream.empty?
scala> fs2.Stream.emit(1)
val res0: fs2.Stream[[x] =>> fs2.Pure[x], Int] = Stream(..)