diff options
author | Paul Phillips <paulp@improving.org> | 2009-03-31 20:58:32 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-03-31 20:58:32 +0000 |
commit | 2abcdde283aa07314d2c7f082152526629af7785 (patch) | |
tree | 88c9240825a2580d2153791151b80a628dfba397 /src/compiler | |
parent | 68bcc9e7c6fff8d2292527440fa0fe65ef8bdff2 (diff) | |
download | scala-2abcdde283aa07314d2c7f082152526629af7785.tar.gz scala-2abcdde283aa07314d2c7f082152526629af7785.tar.bz2 scala-2abcdde283aa07314d2c7f082152526629af7785.zip |
Today's frustration commit! Disables all forwar...
Today's frustration commit! Disables all forwarders including main until
we can figure out how to avoid #1795, and reverts ostensible fix for
#1240 to avoid #1840, #1842, and the rest of the gang.
Diffstat (limited to 'src/compiler')
-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 |
2 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) } |