alac-plugin_2.12.3.0.0-9.source-code.Scratch.scala Maven / Gradle / Ivy
object Scratch extends App {
println(IntINO(5).toZ)
}
trait IntegralNumberOps[T] extends Any {
def toZ: BigInt
}
class IntINO(val value: Int) extends AnyVal with IntegralNumberOps[Int] {
def toZ: BigInt = BigInt(value)
}
object IntINO {
def apply(value: Int): IntINO = new IntINO(value)
}