Type-level programming: unexpected compiler behavior

Here is the code.

The problems I see seem to result in referential transparency violations:

  1. A type alias that behaves differently than the underlying type
  2. A type definition that behaves differently when split into two definitions

Any clues? Should I report these as bugs?

removing the return type bounds from match types seems to fix the issue: Scastie - An interactive playground for Scala.
maybe the buggy behaviour is actually the compiler NOT complaining about these type bounds?

1 Like

Impressive how you find these workarounds/fixes!

I submitted a bug report.