Skip to content

Commit e10929b

Browse files
authored
Merge pull request scala#7880 from sjrd/deprecate-proxy
Deprecate `scala.Proxy`.
2 parents d809519 + 2a46160 commit e10929b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/library/scala/Proxy.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ package scala
2626
* @author Matthias Zenger
2727
* @since 1.0
2828
*/
29+
@deprecated("Explicitly override hashCode, equals and toString instead.", "2.13.0")
2930
trait Proxy extends Any {
3031
def self: Any
3132

@@ -39,9 +40,11 @@ trait Proxy extends Any {
3940
override def toString = "" + self
4041
}
4142

43+
@deprecated("All members of this object are deprecated.", "2.13.0")
4244
object Proxy {
4345
/** A proxy which exposes the type it is proxying for via a type parameter.
4446
*/
47+
@deprecated("Explicitly override hashCode, equals and toString instead.", "2.13.0")
4548
trait Typed[T] extends Any with Proxy {
4649
def self: T
4750
}

test/files/run/proxy.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
warning: there were two deprecation warnings (since 2.13.0); re-run with -deprecation for details
12
false
23
true
34
false

0 commit comments

Comments
 (0)