Ok, I know better than to use nulls as a design choice, but in this case I have to. Why the following does not compile?
def test[T<:AnyRef](o :Option[T]) :T = o getOrElse null Error:(19, 53) type mismatch; found : Null(null) required: T Note: implicit method foreignKeyType is not applicable here because it comes after the application point and it lacks an explicit result type def test[T<:AnyRef](o :Option[T]) :T = o getOrElse null ^
Option.orNull?