For example, when I try to run:
import scala.concurrent.duration._
Await.result(f, 1 seconds)
I get the error:
postfix operator seconds needs to be enabled
How do I do that?
Why do I need that step when I already included the import?
See also - Other question for a previous scala version with different error message covering a similar case but with an ! operator for working with files, but this does not ask the general quesion of how to disable postfix operators, or answer the question of how to use scala.concurrent.duration.
Some of Scalas modular language features need enabling.
Enabling can just be done by using the appropriate import.
In this case it's:
import scala.language.postfixOps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With