Skip to content

MatchError when trying to compile zio-flow #16461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vigoo opened this issue Dec 3, 2022 · 2 comments
Closed

MatchError when trying to compile zio-flow #16461

vigoo opened this issue Dec 3, 2022 · 2 comments

Comments

@vigoo
Copy link

vigoo commented Dec 3, 2022

Compiler version

3.2.1

Minimized code

Unfortunately I could not figure out what is causing the error so I don't have a minimized example yet; I was hoping maybe someone could give me some hints to narrow it down just by looking at the error.

The crash can be reproduced on the scala3 branch of zio-flow: zio-archive/zio-flow#246
by running sbt ++3.2.1 zioFlowJVM/compile

Output (click arrow to expand)

exception while typing zio.flow.RemoteRelational of class class dotty.tools.dotc.ast.Trees$Ident # -1
exception while typing zio.flow.RemoteRelational[Double] of class class dotty.tools.dotc.ast.Trees$TypeApply # -1
exception while typing zio.flow.RemoteRelational[Double](_$1) of class class dotty.tools.dotc.ast.Trees$Apply # -1
exception while typing zio.flow.RemoteRelational[Double](_$1).<= of class class dotty.tools.dotc.ast.Trees$Select # -1
exception while typing zio.flow.RemoteRelational[Double](_$1).<=(
  zio.flow.Remote.apply[Double](0.5d)(
    zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
  )
) of class class dotty.tools.dotc.ast.Trees$Apply # -1
exception while typing zio.flow.RemoteRelational[Double](_$1).<=(
  zio.flow.Remote.apply[Double](0.5d)(
    zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
  )
)(zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)) of class class dotty.tools.dotc.ast.Trees$Apply # -1
exception while typing def $anonfun(_$1: zio.flow.Remote[Double]): zio.flow.Remote[Boolean] =
  zio.flow.RemoteRelational[Double](_$1).<=(
    zio.flow.Remote.apply[Double](0.5d)(
      zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
    )
  )(zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)) of class class dotty.tools.dotc.ast.Trees$DefDef # -1
exception while typing {
  def $anonfun(_$1: zio.flow.Remote[Double]): zio.flow.Remote[Boolean] =
    zio.flow.RemoteRelational[Double](_$1).<=(
      zio.flow.Remote.apply[Double](0.5d)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    )(zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType))
  closure($anonfun)
} of class class dotty.tools.dotc.ast.Trees$Block # -1
exception while typing zio.flow.ZFlow.random.map[Boolean](
  {
    def $anonfun(_$1: zio.flow.Remote[Double]): zio.flow.Remote[Boolean] =
      zio.flow.RemoteRelational[Double](_$1).<=(
        zio.flow.Remote.apply[Double](0.5d)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      )(zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType))
    closure($anonfun)
  }
) of class class dotty.tools.dotc.ast.Trees$Apply # -1
exception while typing def nextBoolean: zio.flow.ZFlow[Any, zio.ZNothing, Boolean] =
  zio.flow.ZFlow.random.map[Boolean](
    {
      def $anonfun(_$1: zio.flow.Remote[Double]): zio.flow.Remote[Boolean] =
        zio.flow.RemoteRelational[Double](_$1).<=(
          zio.flow.Remote.apply[Double](0.5d)(
            zio.schema.Schema.primitive[Double](
              zio.schema.StandardType.DoubleType
            )
          )
        )(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      closure($anonfun)
    }
  ) of class class dotty.tools.dotc.ast.Trees$DefDef # -1
exception while typing @SourceFile("zio-flow/shared/src/main/scala/zio/flow/Random.scala") final module

class Random() extends Object() {
  private def writeReplace(): AnyRef =
    new scala.runtime.ModuleSerializationProxy(classOf[zio.flow.Random.type])
  def nextBoolean: zio.flow.ZFlow[Any, zio.ZNothing, Boolean] =
    zio.flow.ZFlow.random.map[Boolean](
      {
        def $anonfun(_$1: zio.flow.Remote[Double]): zio.flow.Remote[Boolean] =
          zio.flow.RemoteRelational[Double](_$1).<=(
            zio.flow.Remote.apply[Double](0.5d)(
              zio.schema.Schema.primitive[Double](
                zio.schema.StandardType.DoubleType
              )
            )
          )(
            zio.schema.Schema.primitive[Double](
              zio.schema.StandardType.DoubleType
            )
          )
        closure($anonfun)
      }
    )
  def nextBytes(length: zio.flow.Remote[Int]):
    zio.flow.ZFlow[Any, zio.ZNothing, zio.Chunk[Byte]]
   =
    zio.flow.Random.nextIntBetween(
      zio.flow.Remote.apply[Int](-128.toInt)(
        zio.schema.Schema.primitive[Int](zio.schema.StandardType.IntType)
      )
    ,
      zio.flow.Remote.apply[Int](127.toInt.+(1))(
        zio.schema.Schema.primitive[Int](zio.schema.StandardType.IntType)
      )
    ).map[Byte](
      {
        def $anonfun(_$2: zio.flow.Remote[Int]): zio.flow.Remote[Byte] =
          {
            val ev$1: zio.flow.remote.RemoteNumericSyntax[Int] =
              zio.flow.RemoteNumeric[Int](_$2)
            zio.flow.remote.RemoteNumericSyntax.toByte$extension[Int](ev$1)(
              zio.flow.remote.numeric.Numeric.NumericInt
            )
          }
        closure($anonfun)
      }
    ).replicate(length)
  def nextDouble: zio.flow.ZFlow[Any, zio.ZNothing, Double] =
    zio.flow.ZFlow.random
  def nextDoubleBetween(minInclusive: zio.flow.Remote[Double],
    maxExclusive: zio.flow.Remote[Double]
  ): zio.flow.ZFlow[Any, zio.ZNothing, Double] =
    zio.flow.Random.nextDouble.map[Double](
      {
        {
          def $anonfun(value: zio.flow.Remote[Double]): zio.flow.Remote[Double]
             =
          {
            {
              val ev$4: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](minInclusive)
              zio.flow.remote.RemoteNumericSyntax.+$extension[Double](ev$4)(
                {
                  val ev$3: zio.flow.remote.RemoteNumericSyntax[Double] =
                    zio.flow.RemoteNumeric[Double](value)
                  zio.flow.remote.RemoteNumericSyntax.*$extension[Double](ev$3)(
                    {
                      val ev$2: zio.flow.remote.RemoteNumericSyntax[Double] =
                        zio.flow.RemoteNumeric[Double](maxExclusive)
                      zio.flow.remote.RemoteNumericSyntax.-$extension[Double](
                        ev$2
                      )(minInclusive)(
                        zio.flow.remote.numeric.Numeric.NumericDouble
                      )
                    }
                  )(zio.flow.remote.numeric.Numeric.NumericDouble)
                }
              )(zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          }
          closure($anonfun)
        }
      }
    )
  def nextFloat: zio.flow.ZFlow[Any, zio.ZNothing, Float] =
    zio.flow.Random.nextDouble.map[Float](
      {
        def $anonfun(_$3: zio.flow.Remote[Double]): zio.flow.Remote[Float] =
          {
            val ev$5: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$3)
            zio.flow.remote.RemoteNumericSyntax.toFloat$extension[Double](ev$5)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextFloatBetween(minInclusive: zio.flow.Remote[Float],
    maxExclusive: zio.flow.Remote[Float]
  ): zio.flow.ZFlow[Any, zio.ZNothing, Float] =
    zio.flow.Random.nextDoubleBetween(
      {
        val ev$6: zio.flow.remote.RemoteNumericSyntax[Float] =
          zio.flow.RemoteNumeric[Float](minInclusive)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Float](ev$6)(
          zio.flow.remote.numeric.Numeric.NumericFloat
        )
      }
    ,
      {
        val ev$7: zio.flow.remote.RemoteNumericSyntax[Float] =
          zio.flow.RemoteNumeric[Float](maxExclusive)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Float](ev$7)(
          zio.flow.remote.numeric.Numeric.NumericFloat
        )
      }
    ).map[Float](
      {
        def $anonfun(_$4: zio.flow.Remote[Double]): zio.flow.Remote[Float] =
          {
            val ev$8: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$4)
            zio.flow.remote.RemoteNumericSyntax.toFloat$extension[Double](ev$8)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextInt: zio.flow.ZFlow[Any, zio.ZNothing, Int] =
    zio.flow.Random.nextDoubleBetween(
      zio.flow.Remote.apply[Double](-2147483648.toDouble)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ,
      zio.flow.Remote.apply[Double](2147483647.toDouble)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ).map[Int](
      {
        def $anonfun(_$5: zio.flow.Remote[Double]): zio.flow.Remote[Int] =
          {
            val ev$9: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$5)
            zio.flow.remote.RemoteNumericSyntax.toInt$extension[Double](ev$9)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextIntBetween(minInclusive: zio.flow.Remote[Int],
    maxExclusive: zio.flow.Remote[Int]
  ): zio.flow.ZFlow[Any, zio.ZNothing, Int] =
    zio.flow.Random.nextDoubleBetween(
      {
        val ev$10: zio.flow.remote.RemoteNumericSyntax[Int] =
          zio.flow.RemoteNumeric[Int](minInclusive)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Int](ev$10)(
          zio.flow.remote.numeric.Numeric.NumericInt
        )
      }
    ,
      {
        val ev$11: zio.flow.remote.RemoteNumericSyntax[Int] =
          zio.flow.RemoteNumeric[Int](maxExclusive)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Int](ev$11)(
          zio.flow.remote.numeric.Numeric.NumericInt
        )
      }
    ).map[Int](
      {
        def $anonfun(_$6: zio.flow.Remote[Double]): zio.flow.Remote[Int] =
          {
            val ev$12: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$6)
            zio.flow.remote.RemoteNumericSyntax.toInt$extension[Double](ev$12)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextIntBounded(n: zio.flow.Remote[Int]):
    zio.flow.ZFlow[Any, zio.ZNothing, Int]
   =
    zio.flow.Random.nextDoubleBetween(
      zio.flow.Remote.apply[Double](0.0d)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ,
      {
        val ev$13: zio.flow.remote.RemoteNumericSyntax[Int] =
          zio.flow.RemoteNumeric[Int](n)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Int](ev$13)(
          zio.flow.remote.numeric.Numeric.NumericInt
        )
      }
    ).map[Int](
      {
        def $anonfun(_$7: zio.flow.Remote[Double]): zio.flow.Remote[Int] =
          {
            val ev$14: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$7)
            zio.flow.remote.RemoteNumericSyntax.toInt$extension[Double](ev$14)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextLong: zio.flow.ZFlow[Any, zio.ZNothing, Long] =
    zio.flow.Random.nextDoubleBetween(
      zio.flow.Remote.apply[Double](-9223372036854775808L.toDouble)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ,
      zio.flow.Remote.apply[Double](9223372036854775807L.toDouble)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ).map[Long](
      {
        def $anonfun(_$8: zio.flow.Remote[Double]): zio.flow.Remote[Long] =
          {
            val ev$15: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$8)
            zio.flow.remote.RemoteNumericSyntax.toLong$extension[Double](ev$15)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextLongBetween(minInclusive: zio.flow.Remote[Long],
    maxExclusive: zio.flow.Remote[Long]
  ): zio.flow.ZFlow[Any, zio.ZNothing, Long] =
    zio.flow.Random.nextDoubleBetween(
      {
        val ev$16: zio.flow.remote.RemoteNumericSyntax[Long] =
          zio.flow.RemoteNumeric[Long](minInclusive)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Long](ev$16)(
          zio.flow.remote.numeric.Numeric.NumericLong
        )
      }
    ,
      {
        val ev$17: zio.flow.remote.RemoteNumericSyntax[Long] =
          zio.flow.RemoteNumeric[Long](maxExclusive)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Long](ev$17)(
          zio.flow.remote.numeric.Numeric.NumericLong
        )
      }
    ).map[Long](
      {
        def $anonfun(_$9: zio.flow.Remote[Double]): zio.flow.Remote[Long] =
          {
            val ev$18: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$9)
            zio.flow.remote.RemoteNumericSyntax.toLong$extension[Double](ev$18)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextLongBounded(n: zio.flow.Remote[Long]):
    zio.flow.ZFlow[Any, zio.ZNothing, Long]
   =
    zio.flow.Random.nextDoubleBetween(
      zio.flow.Remote.apply[Double](0.0d)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ,
      {
        val ev$19: zio.flow.remote.RemoteNumericSyntax[Long] =
          zio.flow.RemoteNumeric[Long](n)
        zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Long](ev$19)(
          zio.flow.remote.numeric.Numeric.NumericLong
        )
      }
    ).map[Long](
      {
        def $anonfun(_$10: zio.flow.Remote[Double]): zio.flow.Remote[Long] =
          {
            val ev$20: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$10)
            zio.flow.remote.RemoteNumericSyntax.toLong$extension[Double](ev$20)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextPrintableChar: zio.flow.ZFlow[Any, zio.ZNothing, Char] =
    zio.flow.Random.nextDoubleBetween(
      zio.flow.Remote.apply[Double](33.toDouble)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ,
      zio.flow.Remote.apply[Double](17.toDouble)(
        zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType)
      )
    ).map[Char](
      {
        def $anonfun(_$11: zio.flow.Remote[Double]): zio.flow.Remote[Char] =
          {
            val ev$21: zio.flow.remote.RemoteNumericSyntax[Double] =
              zio.flow.RemoteNumeric[Double](_$11)
            zio.flow.remote.RemoteNumericSyntax.toChar$extension[Double](ev$21)(
              zio.flow.remote.numeric.Numeric.NumericDouble
            )
          }
        closure($anonfun)
      }
    )
  def nextString(length: zio.flow.Remote[Int]):
    zio.flow.ZFlow[Any, zio.ZNothing, String]
   =
    zio.flow.Random.nextPrintableChar.replicate(length).map[String](
      {
        def $anonfun(_$12: zio.flow.Remote[zio.Chunk[Char]]):
          zio.flow.Remote[String]
         =
          zio.flow.RemoteChunk[Char](_$12).mkString(
            zio.schema.Schema.primitive[Char](zio.schema.StandardType.CharType)
          )
        closure($anonfun)
      }
    )
  def nextUUID: zio.flow.ZFlow[Any, zio.ZNothing, java.util.UUID] =
    zio.flow.ZFlow.randomUUID
  def shuffle[A](collection: zio.flow.Remote[scala.collection.immutable.List[A]]
    )
  : zio.flow.ZFlow[Any, zio.ZNothing, scala.collection.immutable.List[A]] =
    zio.flow.ZFlow.apply[
      scala.collection.immutable.List[scala.collection.immutable.List[A]]
    ](zio.flow.RemoteList[A](collection).permutations).flatMap[Any, zio.ZNothing
      ,
    scala.collection.immutable.List[A]](
      {
        def $anonfun(
          permutations:

              zio.flow.Remote[
                scala.collection.immutable.List[
                  scala.collection.immutable.List[A]
                ]
              ]

        ): zio.flow.ZFlow[Any, zio.ZNothing, scala.collection.immutable.List[A]]
           =
        zio.flow.Random.nextIntBounded(
          zio.flow.RemoteList[scala.collection.immutable.List[A]](permutations).
            size
        ).map[scala.collection.immutable.List[A]](
          {
            def $anonfun(idx: zio.flow.Remote[Int]):
              zio.flow.Remote[scala.collection.immutable.List[A]]
             =
              zio.flow.RemoteList[scala.collection.immutable.List[A]](
                permutations
              ).apply(idx)
            closure($anonfun)
          }
        )
        closure($anonfun)
      }
    )
} of class class dotty.tools.dotc.ast.Trees$TypeDef # -1
exception while typing package zio.flow {
  import zio.{Chunk, ZNothing}
  import java.util.UUID
  final lazy module val Random: zio.flow.Random = new zio.flow.Random()
  @SourceFile("zio-flow/shared/src/main/scala/zio/flow/Random.scala") final
    module
   class Random() extends Object() {
    private def writeReplace(): AnyRef =
      new scala.runtime.ModuleSerializationProxy(classOf[zio.flow.Random.type])
    def nextBoolean: zio.flow.ZFlow[Any, zio.ZNothing, Boolean] =
      zio.flow.ZFlow.random.map[Boolean](
        {
          def $anonfun(_$1: zio.flow.Remote[Double]): zio.flow.Remote[Boolean]
             =
          zio.flow.RemoteRelational[Double](_$1).<=(
            zio.flow.Remote.apply[Double](0.5d)(
              zio.schema.Schema.primitive[Double](
                zio.schema.StandardType.DoubleType
              )
            )
          )(
            zio.schema.Schema.primitive[Double](
              zio.schema.StandardType.DoubleType
            )
          )
          closure($anonfun)
        }
      )
    def nextBytes(length: zio.flow.Remote[Int]):
      zio.flow.ZFlow[Any, zio.ZNothing, zio.Chunk[Byte]]
     =
      zio.flow.Random.nextIntBetween(
        zio.flow.Remote.apply[Int](-128.toInt)(
          zio.schema.Schema.primitive[Int](zio.schema.StandardType.IntType)
        )
      ,
        zio.flow.Remote.apply[Int](127.toInt.+(1))(
          zio.schema.Schema.primitive[Int](zio.schema.StandardType.IntType)
        )
      ).map[Byte](
        {
          def $anonfun(_$2: zio.flow.Remote[Int]): zio.flow.Remote[Byte] =
            {
              val ev$1: zio.flow.remote.RemoteNumericSyntax[Int] =
                zio.flow.RemoteNumeric[Int](_$2)
              zio.flow.remote.RemoteNumericSyntax.toByte$extension[Int](ev$1)(
                zio.flow.remote.numeric.Numeric.NumericInt
              )
            }
          closure($anonfun)
        }
      ).replicate(length)
    def nextDouble: zio.flow.ZFlow[Any, zio.ZNothing, Double] =
      zio.flow.ZFlow.random
    def nextDoubleBetween(minInclusive: zio.flow.Remote[Double],
      maxExclusive: zio.flow.Remote[Double]
    ): zio.flow.ZFlow[Any, zio.ZNothing, Double] =
      zio.flow.Random.nextDouble.map[Double](
        {
          {
            def $anonfun(value: zio.flow.Remote[Double]):
              zio.flow.Remote[Double]
             =
              {
                {
                  val ev$4: zio.flow.remote.RemoteNumericSyntax[Double] =
                    zio.flow.RemoteNumeric[Double](minInclusive)
                  zio.flow.remote.RemoteNumericSyntax.+$extension[Double](ev$4)(
                    {
                      val ev$3: zio.flow.remote.RemoteNumericSyntax[Double] =
                        zio.flow.RemoteNumeric[Double](value)
                      zio.flow.remote.RemoteNumericSyntax.*$extension[Double](
                        ev$3
                      )(
                        {
                          val ev$2: zio.flow.remote.RemoteNumericSyntax[Double]
                             =
                          zio.flow.RemoteNumeric[Double](maxExclusive)
                          zio.flow.remote.RemoteNumericSyntax.-$extension[Double
                            ]
                          (ev$2)(minInclusive)(
                            zio.flow.remote.numeric.Numeric.NumericDouble
                          )
                        }
                      )(zio.flow.remote.numeric.Numeric.NumericDouble)
                    }
                  )(zio.flow.remote.numeric.Numeric.NumericDouble)
                }
              }
            closure($anonfun)
          }
        }
      )
    def nextFloat: zio.flow.ZFlow[Any, zio.ZNothing, Float] =
      zio.flow.Random.nextDouble.map[Float](
        {
          def $anonfun(_$3: zio.flow.Remote[Double]): zio.flow.Remote[Float] =
            {
              val ev$5: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$3)
              zio.flow.remote.RemoteNumericSyntax.toFloat$extension[Double](ev$5
                )
              (zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextFloatBetween(minInclusive: zio.flow.Remote[Float],
      maxExclusive: zio.flow.Remote[Float]
    ): zio.flow.ZFlow[Any, zio.ZNothing, Float] =
      zio.flow.Random.nextDoubleBetween(
        {
          val ev$6: zio.flow.remote.RemoteNumericSyntax[Float] =
            zio.flow.RemoteNumeric[Float](minInclusive)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Float](ev$6)(
            zio.flow.remote.numeric.Numeric.NumericFloat
          )
        }
      ,
        {
          val ev$7: zio.flow.remote.RemoteNumericSyntax[Float] =
            zio.flow.RemoteNumeric[Float](maxExclusive)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Float](ev$7)(
            zio.flow.remote.numeric.Numeric.NumericFloat
          )
        }
      ).map[Float](
        {
          def $anonfun(_$4: zio.flow.Remote[Double]): zio.flow.Remote[Float] =
            {
              val ev$8: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$4)
              zio.flow.remote.RemoteNumericSyntax.toFloat$extension[Double](ev$8
                )
              (zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextInt: zio.flow.ZFlow[Any, zio.ZNothing, Int] =
      zio.flow.Random.nextDoubleBetween(
        zio.flow.Remote.apply[Double](-2147483648.toDouble)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ,
        zio.flow.Remote.apply[Double](2147483647.toDouble)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ).map[Int](
        {
          def $anonfun(_$5: zio.flow.Remote[Double]): zio.flow.Remote[Int] =
            {
              val ev$9: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$5)
              zio.flow.remote.RemoteNumericSyntax.toInt$extension[Double](ev$9)(
                zio.flow.remote.numeric.Numeric.NumericDouble
              )
            }
          closure($anonfun)
        }
      )
    def nextIntBetween(minInclusive: zio.flow.Remote[Int],
      maxExclusive: zio.flow.Remote[Int]
    ): zio.flow.ZFlow[Any, zio.ZNothing, Int] =
      zio.flow.Random.nextDoubleBetween(
        {
          val ev$10: zio.flow.remote.RemoteNumericSyntax[Int] =
            zio.flow.RemoteNumeric[Int](minInclusive)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Int](ev$10)(
            zio.flow.remote.numeric.Numeric.NumericInt
          )
        }
      ,
        {
          val ev$11: zio.flow.remote.RemoteNumericSyntax[Int] =
            zio.flow.RemoteNumeric[Int](maxExclusive)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Int](ev$11)(
            zio.flow.remote.numeric.Numeric.NumericInt
          )
        }
      ).map[Int](
        {
          def $anonfun(_$6: zio.flow.Remote[Double]): zio.flow.Remote[Int] =
            {
              val ev$12: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$6)
              zio.flow.remote.RemoteNumericSyntax.toInt$extension[Double](ev$12)
                (
              zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextIntBounded(n: zio.flow.Remote[Int]):
      zio.flow.ZFlow[Any, zio.ZNothing, Int]
     =
      zio.flow.Random.nextDoubleBetween(
        zio.flow.Remote.apply[Double](0.0d)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ,
        {
          val ev$13: zio.flow.remote.RemoteNumericSyntax[Int] =
            zio.flow.RemoteNumeric[Int](n)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Int](ev$13)(
            zio.flow.remote.numeric.Numeric.NumericInt
          )
        }
      ).map[Int](
        {
          def $anonfun(_$7: zio.flow.Remote[Double]): zio.flow.Remote[Int] =
            {
              val ev$14: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$7)
              zio.flow.remote.RemoteNumericSyntax.toInt$extension[Double](ev$14)
                (
              zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextLong: zio.flow.ZFlow[Any, zio.ZNothing, Long] =
      zio.flow.Random.nextDoubleBetween(
        zio.flow.Remote.apply[Double](-9223372036854775808L.toDouble)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ,
        zio.flow.Remote.apply[Double](9223372036854775807L.toDouble)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ).map[Long](
        {
          def $anonfun(_$8: zio.flow.Remote[Double]): zio.flow.Remote[Long] =
            {
              val ev$15: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$8)
              zio.flow.remote.RemoteNumericSyntax.toLong$extension[Double](ev$15
                )
              (zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextLongBetween(minInclusive: zio.flow.Remote[Long],
      maxExclusive: zio.flow.Remote[Long]
    ): zio.flow.ZFlow[Any, zio.ZNothing, Long] =
      zio.flow.Random.nextDoubleBetween(
        {
          val ev$16: zio.flow.remote.RemoteNumericSyntax[Long] =
            zio.flow.RemoteNumeric[Long](minInclusive)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Long](ev$16)(
            zio.flow.remote.numeric.Numeric.NumericLong
          )
        }
      ,
        {
          val ev$17: zio.flow.remote.RemoteNumericSyntax[Long] =
            zio.flow.RemoteNumeric[Long](maxExclusive)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Long](ev$17)(
            zio.flow.remote.numeric.Numeric.NumericLong
          )
        }
      ).map[Long](
        {
          def $anonfun(_$9: zio.flow.Remote[Double]): zio.flow.Remote[Long] =
            {
              val ev$18: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$9)
              zio.flow.remote.RemoteNumericSyntax.toLong$extension[Double](ev$18
                )
              (zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextLongBounded(n: zio.flow.Remote[Long]):
      zio.flow.ZFlow[Any, zio.ZNothing, Long]
     =
      zio.flow.Random.nextDoubleBetween(
        zio.flow.Remote.apply[Double](0.0d)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ,
        {
          val ev$19: zio.flow.remote.RemoteNumericSyntax[Long] =
            zio.flow.RemoteNumeric[Long](n)
          zio.flow.remote.RemoteNumericSyntax.toDouble$extension[Long](ev$19)(
            zio.flow.remote.numeric.Numeric.NumericLong
          )
        }
      ).map[Long](
        {
          def $anonfun(_$10: zio.flow.Remote[Double]): zio.flow.Remote[Long] =
            {
              val ev$20: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$10)
              zio.flow.remote.RemoteNumericSyntax.toLong$extension[Double](ev$20
                )
              (zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextPrintableChar: zio.flow.ZFlow[Any, zio.ZNothing, Char] =
      zio.flow.Random.nextDoubleBetween(
        zio.flow.Remote.apply[Double](33.toDouble)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ,
        zio.flow.Remote.apply[Double](17.toDouble)(
          zio.schema.Schema.primitive[Double](zio.schema.StandardType.DoubleType
            )
        )
      ).map[Char](
        {
          def $anonfun(_$11: zio.flow.Remote[Double]): zio.flow.Remote[Char] =
            {
              val ev$21: zio.flow.remote.RemoteNumericSyntax[Double] =
                zio.flow.RemoteNumeric[Double](_$11)
              zio.flow.remote.RemoteNumericSyntax.toChar$extension[Double](ev$21
                )
              (zio.flow.remote.numeric.Numeric.NumericDouble)
            }
          closure($anonfun)
        }
      )
    def nextString(length: zio.flow.Remote[Int]):
      zio.flow.ZFlow[Any, zio.ZNothing, String]
     =
      zio.flow.Random.nextPrintableChar.replicate(length).map[String](
        {
          def $anonfun(_$12: zio.flow.Remote[zio.Chunk[Char]]):
            zio.flow.Remote[String]
           =
            zio.flow.RemoteChunk[Char](_$12).mkString(
              zio.schema.Schema.primitive[Char](zio.schema.StandardType.CharType
                )
            )
          closure($anonfun)
        }
      )
    def nextUUID: zio.flow.ZFlow[Any, zio.ZNothing, java.util.UUID] =
      zio.flow.ZFlow.randomUUID
    def shuffle[A](
      collection: zio.flow.Remote[scala.collection.immutable.List[A]]
    ): zio.flow.ZFlow[Any, zio.ZNothing, scala.collection.immutable.List[A]] =
      zio.flow.ZFlow.apply[
        scala.collection.immutable.List[scala.collection.immutable.List[A]]
      ](zio.flow.RemoteList[A](collection).permutations).flatMap[Any,
        zio.ZNothing
      , scala.collection.immutable.List[A]](
        {
          def $anonfun(
            permutations:

                zio.flow.Remote[
                  scala.collection.immutable.List[
                    scala.collection.immutable.List[A]
                  ]
                ]

          ):

              zio.flow.ZFlow[Any, zio.ZNothing,
                scala.collection.immutable.List[A]
              ]

           =
            zio.flow.Random.nextIntBounded(
              zio.flow.RemoteList[scala.collection.immutable.List[A]](
                permutations
              ).size
            ).map[scala.collection.immutable.List[A]](
              {
                def $anonfun(idx: zio.flow.Remote[Int]):
                  zio.flow.Remote[scala.collection.immutable.List[A]]
                 =
                  zio.flow.RemoteList[scala.collection.immutable.List[A]](
                    permutations
                  ).apply(idx)
                closure($anonfun)
              }
            )
          closure($anonfun)
        }
      )
  }
} of class class dotty.tools.dotc.ast.Trees$PackageDef # -1
scala.MatchError: TypeRef(ThisType(TypeRef(NoPrefix,module class flow)),module class package$) (of class dotty.tools.dotc.core.Types$CachedTypeRef) while running erasure on /Users/vigoo/projects/oss/zio-flow/zio-flow/shared/src/main/scala/zio/flow/Random.scala
[info] exception occurred while compiling [....]
[error] ## Exception when compiling 95 sources to /Users/vigoo/projects/oss/zio-flow/zio-flow/jvm/target/scala-3.2.1/classes
[error] scala.MatchError: TypeRef(ThisType(TypeRef(NoPrefix,module class flow)),module class package$) (of class dotty.tools.dotc.core.Types$CachedTypeRef)
[error] dotty.tools.dotc.core.SymDenotations$SymDenotation.sourceOfSelf$1(SymDenotations.scala:1055)
[error] dotty.tools.dotc.core.SymDenotations$SymDenotation.sourceModule(SymDenotations.scala:1057)
[error] dotty.tools.dotc.core.SymDenotations$PackageClassDenotation.packageObjFor(SymDenotations.scala:2379)
[error] dotty.tools.dotc.core.TypeOps$.tryInsert$1(TypeOps.scala:567)
[error] dotty.tools.dotc.core.TypeOps$.makePackageObjPrefixExplicit(TypeOps.scala:577)
[error] dotty.tools.dotc.core.TypeErasure$.erasedRef(TypeErasure.scala:213)
[error] dotty.tools.dotc.transform.Erasure$Typer.erasedType(Erasure.scala:602)
[error] dotty.tools.dotc.transform.Erasure$Typer.promote(Erasure.scala:607)
[error] dotty.tools.dotc.typer.ReTyper.typedIdent(ReTyper.scala:37)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedIdent(Erasure.scala:641)
[error] dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2888)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2982)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedTypeApply(Erasure.scala:808)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2939)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2983)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:827)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2920)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2983)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedSelect(Erasure.scala:667)
[error] dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2889)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2982)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:827)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2920)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2983)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:827)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2920)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2983)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.typer.Typer.$anonfun$51(Typer.scala:2351)
[error] dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:249)
[error] dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2351)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedDefDef(Erasure.scala:944)
[error] dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2896)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2982)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3076)
[error] dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3126)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1043)
[error] dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1060)
[error] dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1064)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2928)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2983)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.transform.Erasure$Typer.$anonfun$9(Erasure.scala:840)
[error] dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:148)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:840)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2920)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2983)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.typer.Typer.$anonfun$51(Typer.scala:2351)
[error] dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:249)
[error] dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:2351)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedDefDef(Erasure.scala:944)
[error] dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2896)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2982)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3076)
[error] dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3126)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1043)
[error] dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2556)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedClassDef(Erasure.scala:1032)
[error] dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:2908)
[error] dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2912)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2982)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3076)
[error] dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3126)
[error] dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:1043)
[error] dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2687)
[error] dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2953)
[error] dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2983)
[error] dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:126)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3050)
[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:3054)
[error] dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3170)
[error] dotty.tools.dotc.transform.Erasure.run(Erasure.scala:144)
[error] dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:316)
[error] scala.collection.immutable.List.map(List.scala:250)
[error] dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:320)
[error] dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:233)
[error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error] scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1321)
[error] dotty.tools.dotc.Run.runPhases$1(Run.scala:244)
[error] dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:252)
[error] dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:261)
[error] dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68)
[error] dotty.tools.dotc.Run.compileUnits(Run.scala:261)
[error] dotty.tools.dotc.Run.compileSources(Run.scala:185)
[error] dotty.tools.dotc.Run.compile(Run.scala:169)
[error] dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
[error] dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:88)
[error] dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
[error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
[error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
[error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
[error] sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
[error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:534)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:534)
[error] sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:179)
[error] sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:177)
[error] sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:463)
[error] sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
[error] sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[error] sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[error] sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
[error] sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:418)
[error] sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:506)
[error] sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:405)
[error] sbt.internal.inc.Incremental$.apply(Incremental.scala:171)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
[error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
[error] sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[error] sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
[error] sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
[error] sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2363)
[error] sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2313)
[error] sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:30)
[error] sbt.internal.io.Retry$.apply(Retry.scala:46)
[error] sbt.internal.io.Retry$.apply(Retry.scala:28)
[error] sbt.internal.io.Retry$.apply(Retry.scala:23)
[error] sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:30)
[error] sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2311)
[error] scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] sbt.Execute.work(Execute.scala:291)
[error] sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] java.base/java.lang.Thread.run(Thread.java:833)
[error]
[error] stack trace is suppressed; run last zioFlowJVM / Compile / compileIncremental for the full output
[error] (zioFlowJVM / Compile / compileIncremental) scala.MatchError: TypeRef(ThisType(TypeRef(NoPrefix,module class flow)),module class package$) (of class dotty.tools.dotc.core.Types$CachedTypeRef)
[error] Total time: 43 s, completed Dec 3, 2022, 5:47:24 PM
@vigoo vigoo added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 3, 2022
@Kordyjan Kordyjan added stat:needs minimization Needs a self contained minimization area:typer and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 5, 2022
@prolativ
Copy link
Contributor

prolativ commented Dec 5, 2022

This seems related to #16437 and it looks like this already works with the nightly version of the compiler.
With the stable compiler version 3.2.1 it's still possible to make this compile by a workaround:
remove self => alias from package object flow and use

private[flow] val syntax: Syntax = this

instead

@vigoo
Copy link
Author

vigoo commented Dec 5, 2022

Thanks for the workaround!

@vigoo vigoo closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants