diff --git a/tests/run/i14582.scala b/tests/run/i14582.scala new file mode 100644 index 000000000000..bce33aa170b2 --- /dev/null +++ b/tests/run/i14582.scala @@ -0,0 +1,18 @@ +// https://github.com/lampepfl/dotty/issues/14582 +@main def Test() = + val map = Map( + "a" -> 1, + "b" -> 2 + ) + + val mapView = map.view + + val optionMapView = Some(mapView) + + val listOfTuples: List[(String, String)] = List(("c", "d"), ("e", "f")) + + val mapViewWithDefault = optionMapView.getOrElse(Map()) + + val result = mapViewWithDefault ++ listOfTuples + + result.toSeq