val i: java.lang.Integer = null val o: Option[Int] = Option(i) // This yields Some(0)
What is the safe wa
Faced the same issue before. This questionable behavior is known by the Scala team. Seems that changing it breaks something elsewhere. See https://github.com/scala/bug/issues/11236 and https://github.com/scala/scala/pull/5176 .