aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-04-05 22:45:23 +0200
committerliu fengyun <liu@fengy.me>2017-04-06 15:38:04 +0200
commit52521ea6070d907f77ceab0692f804f52c29ffca (patch)
tree3e358f5806fb65423b5e16e9aeabb62bdd721add /tests
parent09cc23726069fa04cbfeec55a9fa4bb8e4a02ff9 (diff)
downloaddotty-52521ea6070d907f77ceab0692f804f52c29ffca.tar.gz
dotty-52521ea6070d907f77ceab0692f804f52c29ffca.tar.bz2
dotty-52521ea6070d907f77ceab0692f804f52c29ffca.zip
Add child annotations for enum values
A new kind of child annotation that points to the term symbol representing an enum value.
Diffstat (limited to 'tests')
-rw-r--r--tests/run/enum-Color.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/run/enum-Color.scala b/tests/run/enum-Color.scala
index 683d18d9e..f4f6aaef8 100644
--- a/tests/run/enum-Color.scala
+++ b/tests/run/enum-Color.scala
@@ -7,5 +7,9 @@ object Test {
for (color <- Color.enumValues) {
println(s"$color: ${color.enumTag}")
assert(Color.enumValue(color.enumTag) eq color)
+ import Color._
+ color match {
+ case Red | Green | Blue =>
+ }
}
}