All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vo_sjs1_2.13.0.90.1.source-code.Schevo.scala Maven / Gradle / Ivy

The newest version!
package net.sc8s.schevo

// define an object extending this trait
trait Schevo {
  // point this to your case class
  type LatestCaseClass <: LatestT

  trait LatestT extends VersionT {
    // esp. useful for _.copy
    def caseClass: LatestCaseClass

    override def evolve = this
  }

  trait VersionT extends Schevo.VersionBase[LatestT]
}

object Schevo {
  // this indirection is mainly for generic evolution from Any to Latest using pattern matching, compare "SchevoSpec/evolve using base trait"
  trait VersionBase[Latest] {
    def evolve: Latest
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy