aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t2524.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/t2524.scala')
-rw-r--r--tests/run/t2524.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run/t2524.scala b/tests/run/t2524.scala
new file mode 100644
index 000000000..e806b8c35
--- /dev/null
+++ b/tests/run/t2524.scala
@@ -0,0 +1,10 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ val m = new collection.mutable.HashMap[String, String] {
+ override def initialSize = 0
+ }
+ m.toString
+ m("key") = "value"
+ assert(m("key") == "value")
+ }
+}