diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-10-18 17:42:57 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-11-22 01:35:06 +0100 |
commit | 2769e1b5b680868433c91b37d44f9420d728c4ac (patch) | |
tree | ba66613269a7b50746f124a92d9c970411521825 /library/src/scala/Eq.scala | |
parent | 2d10c87ce537fb42fdb134efcae53dca7305a7b7 (diff) | |
download | dotty-2769e1b5b680868433c91b37d44f9420d728c4ac.tar.gz dotty-2769e1b5b680868433c91b37d44f9420d728c4ac.tar.bz2 dotty-2769e1b5b680868433c91b37d44f9420d728c4ac.zip |
separate lib from compiler
Diffstat (limited to 'library/src/scala/Eq.scala')
-rw-r--r-- | library/src/scala/Eq.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/library/src/scala/Eq.scala b/library/src/scala/Eq.scala new file mode 100644 index 000000000..d6d617cab --- /dev/null +++ b/library/src/scala/Eq.scala @@ -0,0 +1,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] + |