File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ // https://github.com/scala/scala-collection-contrib/blob/main/src/main/scala/scala/collection/decorators/package.scala
2+ object decorators {
3+ trait IsMap [A ]
4+ implicit def mapDecorator [C ](coll : C )(implicit map : IsMap [C ]): Map [C , map.type ] = ???
5+ }
6+ import decorators .mapDecorator // unused, required to reprouce
7+
8+ trait Eq [T ]
9+ trait Applicative [F [_]]
10+ given Applicative [Option ] = ???
11+
12+ trait Traverse [F [_]]:
13+ // context bound required to reproduce
14+ def sequence [G [_]: Applicative , A ](fga : F [G [A ]]): G [F [A ]] = ???
15+
16+ object Traverse :
17+ def apply [F [_]]: Traverse [F ] = ???
18+
19+ trait Segment [Element : Eq ]
20+
21+ case class MergeResult [Element : Eq ] private (segments : Seq [Segment [Element ]]):
22+ def thisFailsToCompile (): Option [MergeResult [Element ]] =
23+ Traverse [Seq ]
24+ .sequence(Seq .empty[Option [Segment [Element ]]])
25+ .map(MergeResult .apply) // error
You can’t perform that action at this time.
0 commit comments