Open gvolpe opened 4 years ago
More updates! This works:
import io.estatico.newtype.macros.newtype
import munit.golden.internal.Check
sealed trait Yay
object Yay {
@newtype case class MyId(value: java.util.UUID)
case class Foo(x: Int) extends Yay
case class Bar(y: Yay.MyId, z: String) extends Yay
}
Check[Yay]
This doesn't:
import io.estatico.newtype.macros.newtype
import munit.golden.internal.Check
sealed trait Yay
object Yay {
@newtype case class MyId(value: java.util.UUID)
case class Foo(x: Int) extends Yay
case class Bar(y: MyId, z: String) extends Yay
}
Check[Yay] // could not find implicit value for parameter ev: munit.golden.internal.Check.Checks[Yay]
This works:
@newtype case class MyInt(value: Int)
sealed trait Yay
object Yay {
type ID = MyInt.type
case class Foo2(x: Int) extends Yay
case class Bar2(y: ID, z: String) extends Yay
}
Check[Yay]
This doesn't:
@newtype case class MyInt(value: Int)
sealed trait Yay
object Yay {
type ID = MyInt
case class Foo2(x: Int) extends Yay
case class Bar2(y: ID, z: String) extends Yay
}
Check[Yay]
This works:
This doesn't: