Skip to content

Newtypes within a companion object #4

Open
@gvolpe

Description

This works:

@newtype case class Batman(value: java.util.UUID)
@newtype case class Robin(value: java.time.Instant)

sealed trait Yay
object Yay {
  case class Foo(x: Int, aa: Robin) extends Yay
  case class Bar(y: Batman, f: String) extends Yay
}

Check[Yay]

This doesn't:

sealed trait Yay
object Yay {
  @newtype case class Batman(value: java.util.UUID)
  @newtype case class Robin(value: java.time.Instant)
  
  case class Foo(x: Int, aa: Robin) extends Yay
  case class Bar(y: Batman, f: String) extends Yay
}

Check[Yay] // could not find implicit value for parameter ev: munit.golden.internal.Check.Checks[Yay]

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions