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 | |
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
-rw-r--r-- | lib/fjbg.jar.desired.sha1 | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 4 |
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("$")) |