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
object SomeEnum extends Enumeration { type SomeEnum = Value; val ONE, TWO = Value; } object EnumTest { def main (args : Array[String]) { println(SomeEnum.values.size) println(SomeEnum.values); println(SomeEnum.values.size); println(SomeEnum.values); } }
Should result in:
2 SomeEnum.ValueSet(ONE, TWO) 2 SomeEnum.ValueSet(ONE, TWO)
But results in adding "Value" as new element of !SomeEnum:
2 SomeEnum.ValueSet(ONE, TWO) 3 SomeEnum.ValueSet(ONE, TWO, Value)
It doesn't work with:
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-4292?orig=1 Reporter: jaroslaw.wosik Attachments:
Sorry, something went wrong.
@soc said: Works in 2.9 trunk, seems to be duplicate of #4045, #3687.
No branches or pull requests
Should result in:
But results in adding "Value" as new element of !SomeEnum:
It doesn't work with:
It works as expected with Scala 2.8.0.final.
Clearly there was some bug introduced to Enumeration implementation between those versions - maybe something related to Enumeration.values is confused by methods returning Val instances #3616.
The text was updated successfully, but these errors were encountered: