From 3ab4a7b749b82db2bca0525d9ef3b63eb8548712 Mon Sep 17 00:00:00 2001 From: NAME Date: Thu, 31 Jan 2008 13:36:54 +0000 Subject: Inner classes follow their enclosing class to s... Inner classes follow their enclosing class to satisfy the Eclipse Java compiler --- lib/fjbg.jar.desired.sha1 | 2 +- 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("$")) -- cgit v1.2.3