-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Description
Hey,
it seems that there is inconsistency between 0.9.25 and 0.9.26 versions of the library
Below you can find code snippet showing that with versions <= 0.9.25 Concrete type could be passed to function which expects Base
With 0.9.26 it's not possible (compilation error)
Is that intentional?
type BaseRefinement = And[Size[Equal[10]], Forall[LetterOrDigit]]
type Base = String Refined BaseRefinement
type ConcreteRefinement = And[StartsWith[W.`"001"`.T], BaseRefinement]
type Concrete = String Refined ConcreteRefinement
def funBase(b: Base): Unit = println(b)
def funConcrete(c: Concrete): Unit = println(c)
val b: Base = "1234567890"
val c: Concrete = "0012345678"
funBase(b)
funBase(c) // with 0.9.26 doesn't compile, with 0.9.25 works fine
// funConcrete(b) // doesn't compile on both versions - that's fine
funConcrete(c)
Full code snippet ready to compile can be found here (https://gist.github.com/lewapek/3cbf003a000bbe9bf479607e9967d201)
Thanks :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels