diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 3 | ||||
-rwxr-xr-x | src/compiler/scala/tools/nsc/javac/JavaParsers.scala | 15 | ||||
-rw-r--r-- | test/pending/run/bug363.check (renamed from test/files/run/bug363.check) | 0 | ||||
-rw-r--r-- | test/pending/run/bug363.scala (renamed from test/files/run/bug363.scala) | 0 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index e77333581b..c8dfb02ce3 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -219,7 +219,8 @@ abstract class GenJVM extends SubComponent { addForwarders(jclass, lmoc.moduleClass) } // ...but we special case main so at least ticket #363 can continue to work. - else addForwarders(jclass, lmoc.moduleClass, _.name == nme.main) + // XXX we would like to, but doing so induces #1795 as surely as adding them all. + // else addForwarders(jclass, lmoc.moduleClass, _.name == nme.main) } } diff --git a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala index b9c1383c76..da6726d743 100755 --- a/src/compiler/scala/tools/nsc/javac/JavaParsers.scala +++ b/src/compiler/scala/tools/nsc/javac/JavaParsers.scala @@ -425,14 +425,19 @@ trait JavaParsers extends JavaScanners { case _ => // XXX both these checks are definitely necessary, which would // seem to indicate the empty package situation needs review - def isEmptyPkg() = - privateWithin == nme.EMPTY.toTypeName || - privateWithin == nme.EMPTY_PACKAGE_NAME_tn + // def isEmptyPkg() = + // privateWithin == nme.EMPTY.toTypeName || + // privateWithin == nme.EMPTY_PACKAGE_NAME_tn // XXX I think this test should just be "if (defaultAccess)" // but then many cases like pos5/t1176 fail because scala code // with no package cannot access java code with no package. - if (defaultAccess && !isEmptyPkg) - flags |= Flags.PROTECTED // package private + // if (defaultAccess && !isEmptyPkg) + // flags |= Flags.PROTECTED // package private + + // my every attempt so far has left some combination of + // #1240, #1840, #1842, or other java/scala mixes failing. + // Reverting to original code, which means #1240 won't + // work but other variations should. return Modifiers(flags, privateWithin) } diff --git a/test/files/run/bug363.check b/test/pending/run/bug363.check index 040b97c07a..040b97c07a 100644 --- a/test/files/run/bug363.check +++ b/test/pending/run/bug363.check diff --git a/test/files/run/bug363.scala b/test/pending/run/bug363.scala index 104629016e..104629016e 100644 --- a/test/files/run/bug363.scala +++ b/test/pending/run/bug363.scala |