Skip to content

Commit 984d19a

Browse files
test: add in a regression test for #14582 (#17511)
[skip community_build] closes #14582
2 parents 5177b87 + 3270d8e commit 984d19a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/run/i14582.scala

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// https://github.com/lampepfl/dotty/issues/14582
2+
@main def Test() =
3+
val map = Map(
4+
"a" -> 1,
5+
"b" -> 2
6+
)
7+
8+
val mapView = map.view
9+
10+
val optionMapView = Some(mapView)
11+
12+
val listOfTuples: List[(String, String)] = List(("c", "d"), ("e", "f"))
13+
14+
val mapViewWithDefault = optionMapView.getOrElse(Map())
15+
16+
val result = mapViewWithDefault ++ listOfTuples
17+
18+
result.toSeq

0 commit comments

Comments
 (0)