aboutsummaryrefslogtreecommitdiff
path: root/stage1
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-11-10 01:43:20 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2016-11-10 01:44:46 -0500
commite6568ab2b821891acfeb5ded1e0555ebc5f9fe81 (patch)
tree628fcb234cf93cc939699a9eec08517605821999 /stage1
parent11d01cbd4900ebdddff585f0f6bbae24eb3ed012 (diff)
downloadcbt-e6568ab2b821891acfeb5ded1e0555ebc5f9fe81.tar.gz
cbt-e6568ab2b821891acfeb5ded1e0555ebc5f9fe81.tar.bz2
cbt-e6568ab2b821891acfeb5ded1e0555ebc5f9fe81.zip
typesafe ===
Diffstat (limited to 'stage1')
-rw-r--r--stage1/cbt.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/stage1/cbt.scala b/stage1/cbt.scala
index c08a5f3..a324d29 100644
--- a/stage1/cbt.scala
+++ b/stage1/cbt.scala
@@ -5,6 +5,11 @@ import java.net._
import java.util.concurrent.ConcurrentHashMap
object `package`{
+ implicit class TypeInferenceSafeEquals[T](value: T){
+ /** if you don't manually upcast, this will catch comparing different types */
+ def ===(other: T) = value == other
+ }
+
val mavenCentral = new URL("https://repo1.maven.org/maven2")
val jcenter = new URL("https://jcenter.bintray.com")
def bintray(owner: String) = new URL(s"https://dl.bintray.com/$owner/maven") // FIXME: url encode owner