estatico / scala-newtype

NewTypes for Scala with no runtime overhead
Apache License 2.0
540 stars 31 forks source link

Ability to specify lower bound of Null #68

Open steinybot opened 3 years ago

steinybot commented 3 years ago

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