Skip to content

Commit 9e77cf6

Browse files
committed
optimization: avoid NotGiven allocations
1 parent 528d931 commit 9e77cf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/util/NotGiven.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ object NotGiven extends LowPriorityNotGiven {
3535
* search for `C`). A reference to this value will be explicitly constructed by Dotty's
3636
* implicit search algorithm
3737
*/
38-
def value: NotGiven[Nothing] = new NotGiven[Nothing]()
38+
val value: NotGiven[Nothing] = new NotGiven[Nothing]()
3939

4040
/** One of two ambiguous methods used to emulate negation in Scala 2 */
4141
given amb1[T](using ev: T): NotGiven[T] = ???

0 commit comments

Comments
 (0)