summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-09-10 00:35:05 +0000
committerPaul Phillips <paulp@improving.org>2011-09-10 00:35:05 +0000
commitcbf8534ff7a04603e7c47c0a2422c012ddd44810 (patch)
treeaff99c9e8ecda23ea3e840b7f1eb40c1b478b17b /src
parentb2b068133a68eb05001c6a233ede5af9e473f796 (diff)
downloadscala-cbf8534ff7a04603e7c47c0a2422c012ddd44810.tar.gz
scala-cbf8534ff7a04603e7c47c0a2422c012ddd44810.tar.bz2
scala-cbf8534ff7a04603e7c47c0a2422c012ddd44810.zip
Helping Proxy equal itself.
Fix for bumpy proxy equals. Closes SI-4807, no review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/reflect/internal/Symbols.scala2
-rw-r--r--src/library/scala/Proxy.scala7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/scala/reflect/internal/Symbols.scala b/src/compiler/scala/reflect/internal/Symbols.scala
index 60b0c411da..60d544fe17 100644
--- a/src/compiler/scala/reflect/internal/Symbols.scala
+++ b/src/compiler/scala/reflect/internal/Symbols.scala
@@ -2134,7 +2134,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
*
* If typeParams is nonEmpty, calling tpe may hide errors or
* introduce spurious ones. (For example, when deriving a type from
- * the symbol of a type argument that must be higher-kinded.) As far
+ * the symbol of a type argument that may be higher-kinded.) As far
* as I can tell, it only makes sense to call tpe in conjunction
* with a substitution that replaces the generated dummy type
* arguments by their actual types.
diff --git a/src/library/scala/Proxy.scala b/src/library/scala/Proxy.scala
index f79b01bf83..383ff5b3bb 100644
--- a/src/library/scala/Proxy.scala
+++ b/src/library/scala/Proxy.scala
@@ -27,11 +27,10 @@ trait Proxy {
override def hashCode: Int = self.hashCode
override def equals(that: Any): Boolean = that match {
- case null => false
- case x: Equals => (x canEqual self) && (x equals self)
- case x => (x equals self)
+ case null => false
+ case x: AnyRef => (x eq this) || (x eq self.asInstanceOf[AnyRef]) || (x equals self)
}
- override def toString: String = self.toString
+ override def toString = "" + self
}
object Proxy {