Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spurious warning for deprecated case class #2799

Closed
scabug opened this issue Dec 14, 2009 · 3 comments
Closed

spurious warning for deprecated case class #2799

scabug opened this issue Dec 14, 2009 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Dec 14, 2009

scala> [paulp@jon Desktop]$$ scala -deprecation

scala> @deprecated("hi mom") case class Bob ()
<console>:4: warning: class Bob in object $$iw is deprecated: hi mom
       @deprecated("hi mom") case class Bob ()
                                        ^
@scabug
Copy link
Author

scabug commented Dec 14, 2009

Imported From: https://issues.scala-lang.org/browse/SI-2799?orig=1
Reporter: @paulp

@scabug
Copy link
Author

scabug commented Dec 15, 2009

@lrytz said:
I guess the reason is the factory method in the companion object:

final <synthetic> object Bob extends java.lang.Object with () => $$iw.$$iw.Bob with ScalaObject {
[...]
  case <synthetic> def apply(): $$iw.$$iw.Bob = new $$iw.this.Bob()
[...]
}

The solution is probably to mark the companion object deprecated as well.

@scabug
Copy link
Author

scabug commented Aug 6, 2010

@lrytz said:
(In r22694) close #2799. companion objects of deprecated classes are also marked as deprecated. review by extempore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants