aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1045.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-04 14:37:44 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-04 14:37:56 +0100
commit8efdbdc9843f66fbb8fc39aa2716da0fe7187fd9 (patch)
tree243f8f8ece4db7840291c6ce80414caed284762e /tests/pos/i1045.scala
parent7d1d93e95113802bee77b9d2b89475a56be46bf7 (diff)
downloaddotty-8efdbdc9843f66fbb8fc39aa2716da0fe7187fd9.tar.gz
dotty-8efdbdc9843f66fbb8fc39aa2716da0fe7187fd9.tar.bz2
dotty-8efdbdc9843f66fbb8fc39aa2716da0fe7187fd9.zip
Try to make refinements match in approximateUnions
See comment in Typer#approximateUnion for an explanation. Fixes #1045.
Diffstat (limited to 'tests/pos/i1045.scala')
-rw-r--r--tests/pos/i1045.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/i1045.scala b/tests/pos/i1045.scala
new file mode 100644
index 000000000..f5985af92
--- /dev/null
+++ b/tests/pos/i1045.scala
@@ -0,0 +1,7 @@
+import scala.collection._
+object T {
+ val newSymbolMap: mutable.HashMap[String, mutable.HashMap[Int, Double]] = mutable.HashMap.empty
+ val map = newSymbolMap.getOrElse("a", mutable.HashMap.empty)
+ map.put(1, 0.0)
+ newSymbolMap.put("a", map)
+}