diff options
Diffstat (limited to 'test/files/run/t493.scala')
-rw-r--r-- | test/files/run/t493.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/t493.scala b/test/files/run/t493.scala new file mode 100644 index 0000000000..7aaad1fece --- /dev/null +++ b/test/files/run/t493.scala @@ -0,0 +1,22 @@ +object Test { + + val y = new collection.mutable.HashMap[String,Any] + val z = new collection.mutable.HashMap[String,Any] + + y("msg") = Array[String]("1","2") + + val array: Array[String] = Array[String]("1","2") + z("msg") = array + + def main(args:Array[String]) = { + + assert(y("msg").isInstanceOf[Array[_]]) + assert(z("msg").isInstanceOf[Array[_]]) + + // these work, without producing a match error + + (z.get("msg"): @unchecked) match { + case Some(_:Array[String]) => + } + } +} |