aboutsummaryrefslogtreecommitdiff
path: root/library/src/scala/Eq.scala
blob: d6d617cab7c6082b1015b1a7e51787c6c6cf9168 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package scala

import annotation.implicitNotFound

/** A marker trait indicating that values of type `L` can be compared to values of type `R`. */
@implicitNotFound("Values of types ${L} and ${R} cannot be compared with == or !=")
sealed trait Eq[-L, -R]

/** Besides being a companion object, this object
 *  can also be used as a value that's compatible with
 *  any instance of `Eq`.
 */
object Eq extends Eq[Any, Any]