-
Notifications
You must be signed in to change notification settings - Fork 2
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
Newtypes within a companion object #4
Labels
bug
Something isn't working
Comments
gvolpe
changed the title
Does not work with newtypes withing a companion object
Does not work with newtypes within a companion object
Oct 28, 2020
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] |
gvolpe
changed the title
Does not work with newtypes within a companion object
Newtypes within a companion object
Oct 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works:
This doesn't:
The text was updated successfully, but these errors were encountered: