You didn't post the stack trace, which is a compiler crash and not a failed assertion by joda.
The REPL is crashing compiling the expression.
It looks like AbstractDateTime
has an overloaded toString
method, and overload resolution crashes on the @ToString
annotation on the usual toString()
. (The symbol for ToString
is missing.)
But stringOf(x: Any)
is just invoking Object.toString()
, of course.
There are some known issues, apparently. A recent issue was fixed.
On 2.10.4:
scala> (dt: Any).toString
res0: String = 2014-05-14T11:56:21.794-07:00
scala> dt.toString
<console>:9: error: ambiguous reference to overloaded definition,
both method toString in class AbstractDateTime of type (x$1: String, x$2: java.util.Locale)String
and method toString in class AbstractDateTime of type (x$1: String)String
match expected type ?
dt.toString
^
scala> dt.toString() // crashes
2.10.3 is bumpier and claims error while loading DateTime, class file is broken
.
The crash is on 2.11.0.