import upickle.default._
final case class Wrapper[X](x : X)
sealed abstract class DSL[T]
final case object DSLUnit extends DSL[Unit]
//final case class DSLWrap[T](x : DSL[T]) extends DSL[Wrapper[T]]
//final case class DSLUnWrap[T](x : DSL[Wrapper[T]]) extends DSL[T]
//either two line will cause error
object Bug {
def x = read[DSL[Unit]](write[DSL[Unit]](DSLUnit))
}
It should work if writer and reader is generated lazily. Some compile check might be loss (since determining this is equal to halting problem)
It should work if writer and reader is generated lazily. Some compile check might be loss (since determining this is equal to halting problem)
ID: 166 Original Author: MarisaKirisame