summaryrefslogtreecommitdiff
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
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
-rw-r--r--lib/fjbg.jar.desired.sha12
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/fjbg.jar.desired.sha1 b/lib/fjbg.jar.desired.sha1
index 968f6d8761..f048929649 100644
--- a/lib/fjbg.jar.desired.sha1
+++ b/lib/fjbg.jar.desired.sha1
@@ -1 +1 @@
-c1b9d9705e894c62343bc67d0ef4138b9fadbc97 ?fjbg.jar
+ed1469d10555114b9766c8b87881125653d4c9e9 ?fjbg.jar
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("$"))