I am working through the examples in Spark in Action, and there was an example about implicit conversions in Scala, with code like this:
class ClassOne[T](val input: T) { }
class ClassOneStr(val one: ClassOne[String]) {
def duplicatedString() = one.input + one.input
}
class ClassOneInt(val one: ClassOne[Int]) {
def duplicatedInt() = one.input.toString + one.input.toString
}
implicit def toStrMethods(one: ClassOne[String]) = new ClassOneStr(one)
implicit def toIntMethods(one: ClassOne[Int]) = new ClassOneInt(one)
I input these lines into the spark shell, but after each of the implicit defs I get a warning like this:
warning: there were 1 feature warning(s); re-run with -feature for details
It still seems to work, but what does the warning mean?