Created
December 7, 2011 08:26
-
-
Save ogatatsu/1441983 to your computer and use it in GitHub Desktop.
ProxyT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class ProxyT[T <: ProxyT[T]](implicit cm: ClassManifest[T]) { | |
val underlying: Any | |
override def hashCode: Int = underlying.hashCode | |
override def equals(other: Any): Boolean = other match { | |
case that: T if(cm.erasure.isInstance(that)) => underlying.equals(that.underlying) | |
case _ => false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment