scala-newtype icon indicating copy to clipboard operation
scala-newtype copied to clipboard

Ability to specify lower bound of Null

Open steinybot opened this issue 4 years ago • 0 comments

If we try this:

  @newsubtype final case class Foo(value: Integer)

  implicitly[Null <:< Foo]

Then it fails to compile with:

[error] Cannot prove that Null <:< web.base.react.package.Foo.
[error]   implicitly[Null <:< Foo]
[error]             ^

Would it be possible that if Repr <: AnyRef then Type becomes:

type Type >: Null <: Base with Tag

steinybot avatar Aug 16 '21 04:08 steinybot