Skip to content

Commit 4367b20

Browse files
committed
make Option.fromNullable extension method inline so it can be used outside the compiler
1 parent 47e3f9f commit 4367b20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/runtime/stdLibPatches/Predef.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ object Predef:
6161
inline def ne(inline y: AnyRef | Null): Boolean =
6262
!(x eq y)
6363

64-
extension (opt: Option.type) def fromNullable[T](t: T|Null): Option[T] = Option(t).asInstanceOf
64+
extension (inline opt: Option.type) inline def fromNullable[T](t: T|Null): Option[T] = Option(t).asInstanceOf
6565
end Predef

0 commit comments

Comments
 (0)