We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A compilation error is returned when trying to compile a scala file containing a value defined in inherited class as protected:
// a/Foo.scala package a class Foo { protected[Foo] var x = 0 }
// b/Bar.scala package b class Bar extends a.Foo { println(x) }
$ fsc a/Foo.scala $ fsc b/Bar.scala b/Bar.scala:4: error: not found: value x println(x) ^ one error found $
If the 2 scala files are compile at the same time, the compilation goes fine.
$ fsc a/Foo.scala b/Bar.scala $
This problem has originally been reported against scala-ide: http://www.assembla.com/spaces/scala-ide/tickets/1000567
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-5013?orig=1 Reporter: @skyluc Affected Versions: 2.9.2
Sorry, something went wrong.
@paulp said: Note for future me: protected[a] is visible, protected[Foo] is not.
@odersky said: Fixed in r25959
@JamesIry said: Additional test at scala/scala#2137
paulp
No branches or pull requests
A compilation error is returned when trying to compile a scala file containing a value defined in inherited class as protected:
If the 2 scala files are compile at the same time, the compilation goes fine.
This problem has originally been reported against scala-ide: http://www.assembla.com/spaces/scala-ide/tickets/1000567
The text was updated successfully, but these errors were encountered: