From 52521ea6070d907f77ceab0692f804f52c29ffca Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 5 Apr 2017 22:45:23 +0200 Subject: Add child annotations for enum values A new kind of child annotation that points to the term symbol representing an enum value. --- tests/run/enum-Color.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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 => + } } } -- cgit v1.2.3