aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t374.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t374.scala')
-rw-r--r--tests/untried/pos/t374.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/untried/pos/t374.scala b/tests/untried/pos/t374.scala
new file mode 100644
index 000000000..fb9c0b402
--- /dev/null
+++ b/tests/untried/pos/t374.scala
@@ -0,0 +1,21 @@
+object tokens extends Enumeration {
+ type Token = Value;
+ val BAD = Value("<bad>");
+ val IDENT = Value("ident");
+ val NAME = Value("name");
+}
+
+object test extends AnyRef with App {
+ import tokens._;
+
+ val reserved = new scala.collection.mutable.HashMap[String, Token]();
+
+ if (true) {
+ reserved.get("a") match {
+ case None => IDENT
+ case Some(tk) => tk
+ }
+ }
+ else
+ BAD
+}