diff options
Diffstat (limited to 'test/files/pos/bug374.scala')
-rw-r--r-- | test/files/pos/bug374.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/pos/bug374.scala b/test/files/pos/bug374.scala new file mode 100644 index 0000000000..9a452cbb79 --- /dev/null +++ b/test/files/pos/bug374.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 Object with Application { + 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 +} |