Releases: rudogma/scala-supertagged
Releases · rudogma/scala-supertagged
Big changes. See README
2.13 Support
1.5 Bump sbt and plugins versions
Changed TaggedTypeF implementation
Previous implementation was wrong.
Before:
def Width[T] = TaggedTypeF[T]
type Width[T] = TaggedTypeF[T]#Type
def Height[T] = TaggedTypeF[T]
type Height[T] = TaggedTypeF[T]#Type
val w = Width[Int](5)
val h = Height[Int](5)
// this function will accept both @w && @h
onlyWidthOfInt(w) // compiles ok
onlyWidthOfInt(h) // compiles ok, wrong behaviour
def onlyWidthOfInt(width:Width[Int]):Unit = {}
Now
object Width extends TaggedTypeF
type Width[T] = Width.Type[T]
object Height extends TaggedTypeF
type Height[T] = Height.Type[T]
val w = Width[Int](5)
val h = Height[Int](5)
onlyWidthOfInt(w) // compiles ok
onlyWidthOfInt(h) // compiles fail, right behaviour
def onlyWidthOfInt(width:Width[Int]):Unit = {}