jodatime - In Scala I can have reference to a private type via implicit conversion -


i've found interesting behaviour in nscala_time package (scala version of joda-time)

import com.github.nscala_time.time.imports._ import com.github.nscala_time.time.durationbuilder  object tests {   val x = 3 seconds   //> x : of type com.github.nscala_time.time.durationbuilder    val xx: durationbuilder = 3 seconds   //> fails compile:    // class durationbuilder in package time cannot accessed in package com.github.nscala_time.time } 

what i'm trying achieve implicit conversion nscala_time duration scala.concurrent.duration need becuase i'm using rxscala , nscala_time in 1 application.

// e.g. following should implicitly converted // nscala_time duration first // scala.lang.concurrent.duration 3 seconds 

nscala_time offers rich time & date api application, while i'm using rxscala in same class gui responsivness. can download simple project play around: https://dl.dropboxusercontent.com/u/9958045/implicit_vs_private.zip

from scala-user group: it's known issue https://issues.scala-lang.org/browse/si-1800


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -