diff options
author | NAME <USER@epfl.ch> | 2008-01-31 13:36:54 +0000 |
---|---|---|
committer | NAME <USER@epfl.ch> | 2008-01-31 13:36:54 +0000 |
commit | 3ab4a7b749b82db2bca0525d9ef3b63eb8548712 (patch) | |
tree | 9d7a095394454d1daef497c5b33e07e9620e6d1f /src | |
parent | fb77e1641132d2b75509b8566234a0e1dfb26f80 (diff) | |
download | scala-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.scala | 4 |
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("$")) |