We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For example, an instance of scala.collection.mutable.Buffer can be created via:
scala.collection.mutable.Buffer
val buffer = scala.collection.mutable.Buffer.empty[Int]
Since this method returns a different buffer for each call, it has side effect. Then, this method should be called as the followings:
val buffer = scala.collection.mutable.Buffer.empty[Int]()
However, since empty[T] method is declared as 'no parentheses' method, it cannot be done. I think it should be fixed. How do you think about it?
empty[T]
The text was updated successfully, but these errors were encountered:
We discussed this at scala/collection-strawman#520. Please re-open if you think that it needs further discussion.
Sorry, something went wrong.
No branches or pull requests
For example, an instance of
scala.collection.mutable.Buffer
can be created via:Since this method returns a different buffer for each call, it has side effect. Then, this method should be called as the followings:
However, since
empty[T]
method is declared as 'no parentheses' method, it cannot be done. I think it should be fixed. How do you think about it?The text was updated successfully, but these errors were encountered: