Suppose I have
val a: Option[String] = None
someJavaFunction(a)
And then in the java file, I want to do something like this:
public someJavaFunction(Option<String> o) {
o.orNull();
}
The signature of orNull, however, is this:
orNull [A1 >: A](implicit ev : <:<[Null, A1]) : A1
So from Java, I'd need to supply this evidence function that is usually magicked in by Scala (from I know not where). How might I get hold of the evidence value to pass in here?
This is clearly not sensible.
Is it possible?