summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNAME <USER@epfl.ch>2008-01-31 13:36:54 +0000
committerNAME <USER@epfl.ch>2008-01-31 13:36:54 +0000
commit3ab4a7b749b82db2bca0525d9ef3b63eb8548712 (patch)
tree9d7a095394454d1daef497c5b33e07e9620e6d1f /src
parentfb77e1641132d2b75509b8566234a0e1dfb26f80 (diff)
downloadscala-3ab4a7b749b82db2bca0525d9ef3b63eb8548712.tar.gz
scala-3ab4a7b749b82db2bca0525d9ef3b63eb8548712.tar.bz2
scala-3ab4a7b749b82db2bca0525d9ef3b63eb8548712.zip
Inner classes follow their enclosing class to s...
Inner classes follow their enclosing class to satisfy the Eclipse Java compiler
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index 88ce24bc03..b7b2e9c754 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -440,7 +440,9 @@ abstract class GenJVM extends SubComponent {
if (!innerClasses.isEmpty) {
val innerClassesAttr = jclass.getInnerClasses()
- for (innerSym <- innerClasses) {
+ // sort them so inner classes succeed their enclosing class
+ // to satisfy the Eclipse Java compiler
+ for (innerSym <- innerClasses.toList.sort(_.name.length < _.name.length)) {
var outerName = javaName(innerSym.rawowner)
// remove the trailing '$'
if (outerName.endsWith("$"))