Skip to content

Refined types within a companion objection #6

Open
@gvolpe

Description

Similar to what happens with newtypes in #4, I guess this is related.

This works:

type MyId = String Refined Uuid

sealed trait Yay
object Yay {
  case class Foo(x: Int) extends Yay
  case class Bar(y: MyId, z: String) extends Yay
}

Check[Yay]

This doesn't:

sealed trait Yay
object Yay {
  type MyId = String Refined Uuid

  case class Foo(x: Int) extends Yay
  case class Bar(y: MyId, z: String) extends Yay
}

Check[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