- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Another 2.9.0 regression
Thu, 2011-05-19, 21:58
https://issues.scala-lang.org/browse/SI-4586?focusedCommentId=53227#comment-53227
IIUC Debasish hit this one first, in a much more rarefied context, so it presumably didn't seem so serious a few days ago... But my colleague found a much more basic issue that I've added as a comment to #4586, because it seems to result in the same stack trace, although it may not be the same underlying issue.
In short, this crashes in 2.9.0.final:
But this doesn't (i.e. there's no val definition)
Nor does this (note that the declaration is in the outer scope)
-0xe1a
IIUC Debasish hit this one first, in a much more rarefied context, so it presumably didn't seem so serious a few days ago... But my colleague found a much more basic issue that I've added as a comment to #4586, because it seems to result in the same stack trace, although it may not be the same underlying issue.
In short, this crashes in 2.9.0.final:
object T4586 {
{ val x = classOf[List[_]] }
}
But this doesn't (i.e. there's no val definition)
object T4586_Nope1 {
{ classOf[List[_]] }
}
Nor does this (note that the declaration is in the outer scope)
object T4586_Nope2 {
val x = classOf[List[_]]
}
-0xe1a
Well, it's not *quite* as serious as I thought, because there is a workaround (that I had somehow missed earlier... sigh): use the unaliased List type:
Also, to further clarify, the problem also exists when the inner scope is a method, it's not just a problem with anonymous blocks.
-0xe1a