-
Notifications
You must be signed in to change notification settings - Fork 21
Optimiser disagrees with compiler over what syntax is valid #5322
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5322?orig=1 |
@richdougherty said:
|
@magarciaEPFL said: |
someone want to check if this is still a bug in 2.12? closing on the suspicion it probably isn't |
Confirmed can't reproduce |
import java.io.{File}
abstract sealed trait Path {
val path: String
val name: String
}
case class ExternalPath(path: String) extends File(path) with Path {
override lazy val name: String = getName
}
$ scalac -version
Scala compiler version 2.10.0.dev-1302-g6a33a20 -- Copyright 2002-2011, LAMP/EPFL
$ scala z.scala
$
$ scala -optimize z.scala
/tmp/z.scala:6: error: overriding value path in trait Path of type String;
variable path in class File of type String has weaker access privileges; it should not be private
case class ExternalPath(path: String) extends File(path) with Path {
^
one error found
$
The text was updated successfully, but these errors were encountered: