开发者

Enumeration.values adds a value to set when called twice?

scala> object Foo extends Enumeration {
     | val B开发者_JS百科ar = Value(23)
     | val Moo = Value(57)
     | }
defined module Foo

scala> Foo.values
res27: Foo.ValueSet = Foo.ValueSet(Bar, Moo)

So far as expected. But then (continuing from above):

scala> Foo.values
res28: Foo.ValueSet = Foo.ValueSet(Bar, Moo, Value)

What just happened?


This is a bug in Scala 2.8.1. See the issue on JIRA.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜