ducktape icon indicating copy to clipboard operation
ducktape copied to clipboard

New `F-unwrapping` example would not work in Scala 3.4+

Open WojciechMazur opened this issue 7 months ago • 4 comments

The example from release notes 0.2.3 and the first test case https://github.com/arainko/ducktape/blob/54d7942a0bc5a4fc310fd7bfdf129d7ff7528155/ducktape/src/test/scala/io/github/arainko/ducktape/fallible/FUnwrappingSuite.scala#L10-L25 would not work in Scala 3.4 and it's changes to better specification and less unsoundness in match types I would fail with the following error:

[error] -- [E191] Type Error: /Users/wmazur/projects/community-build3/repo/ducktape/src/test/scala/io/github/arainko/ducktape/fallible/FUnwrappingSuite.scala:21:37 
[error] 21 |      val actual = source.fallibleTo[Tuple.InverseMap[source.type, mode.Self]]
[error]    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]    |       The match type contains an illegal case:
[error]    |           case mode.Self[x] *: t => x *: Tuple.InverseMap[t, mode.Self]
[error]    |       The pattern contains a type alias `Self`.
[error]    |       (this error can be ignored for now with `-source:3.3`)

WojciechMazur avatar Jul 23 '24 16:07 WojciechMazur