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

Overriding protected member in case class constructor #8132

Closed
scabug opened this issue Jan 9, 2014 · 2 comments
Closed

Overriding protected member in case class constructor #8132

scabug opened this issue Jan 9, 2014 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jan 9, 2014

trait T {
  protected def s: String
}

case class G(override protected val s: String) extends T

This code results in a compile error:

<console>:11: error: value s$1 overrides nothing
       case class G(override protected val s: String) extends T
                  ^

More detailed explanation of this error is in
http://stackoverflow.com/questions/21019966/scala-override-protected-val-results-in-error-when-defining-case-class-constr

@scabug
Copy link
Author

@scabug scabug commented Jan 9, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8132?orig=1
Reporter: Eun, Naetmul (Naetmul)
Affected Versions: 2.10.3

@scabug
Copy link
Author

@scabug scabug commented Jan 15, 2014

@scabug scabug closed this Jan 15, 2014
@scabug scabug added this to the 2.11.0-M8 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants