We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95a8a9c commit a3bfa2eCopy full SHA for a3bfa2e
library/src/scala/runtime/stdLibPatches/Predef.scala
@@ -62,4 +62,8 @@ object Predef:
62
* `eq` or `ne` methods, only `==` and `!=` inherited from `Any`. */
63
inline def ne(inline y: AnyRef | Null): Boolean =
64
!(x eq y)
65
+
66
+ extension (inline opt: Option.type)
67
+ @experimental
68
+ inline def fromNullable[T](t: T | Null): Option[T] = Option(t).asInstanceOf
69
end Predef
0 commit comments