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
final inner class not final in bytecode #7151
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7151?orig=1 |
@retronym said: import java.lang.reflect.Modifier.isFinal
object Test {
final case class InnerCase()
final class InnerNonCase()
def main(args: Array[String]) {
def checkFinal(clazz: Class[_]) =
println(s"${clazz} isFinal = ${isFinal(clazz.getModifiers())}")
checkFinal(classOf[InnerCase])
checkFinal(classOf[InnerNonCase])
checkFinal(classOf[TopLevelCase])
checkFinal(classOf[TopLevelNonCase])
}
}
final case class TopLevelCase()
final case class TopLevelNonCase()
It regressed in scala/scala@18efded |
@retronym said: |
Andreas Joseph Krogh (andreak) said: |
@retronym said: |
Andreas Joseph Krogh (andreak) said (edited on Sep 17, 2013 7:19:27 AM UTC): |
@retronym said: |
Andreas Joseph Krogh (andreak) said: |
This works fine in 2.9.{1,2}:
In Scala-2.10.0 and 2.10.1-RC1 the case class isn't recognized as final anymore:
The text was updated successfully, but these errors were encountered: