|
1 | 1 | package scala |
2 | 2 | import compiletime.ops.boolean.* |
3 | 3 | import compiletime.summonAll |
4 | | -import collection.immutable.ListMap |
| 4 | +import collection.immutable.{SeqMap, ListMap} |
5 | 5 |
|
6 | 6 | import language.experimental.captureChecking |
7 | 7 |
|
@@ -32,7 +32,7 @@ object NamedTuple: |
32 | 32 | import NamedTupleDecomposition.{Names, DropNames} |
33 | 33 | export NamedTupleDecomposition.{ |
34 | 34 | Names, DropNames, |
35 | | - apply, size, init, head, last, tail, take, drop, splitAt, ++, map, reverse, zip, toList, toArray, toIArray, toListMap |
| 35 | + apply, size, init, head, last, tail, take, drop, splitAt, ++, map, reverse, zip, toList, toArray, toIArray, toSeqMap |
36 | 36 | } |
37 | 37 |
|
38 | 38 | extension [N <: Tuple, V <: Tuple](x: NamedTuple[N, V]) |
@@ -214,7 +214,7 @@ object NamedTupleDecomposition: |
214 | 214 | /** An immutable map consisting of all element values preserving an order of fields. |
215 | 215 | * Keys are the names of the elements. |
216 | 216 | */ |
217 | | - inline def toListMap: ListMap[String, Tuple.Union[V]] = |
| 217 | + inline def toSeqMap: SeqMap[String, Tuple.Union[V]] = |
218 | 218 | inline compiletime.constValueTuple[N].toList match |
219 | 219 | case names: List[String] => |
220 | 220 | ListMap.from(names.iterator.zip( |
|
0 commit comments