diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2009-04-09 09:20:37 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2009-04-09 09:20:37 +0000 |
commit | b06edbc46d2b08752f6bd751f030a166c7628c98 (patch) | |
tree | abbdf711f340ee63083a33f89a821588b13a36c3 /src/compiler | |
parent | e42d7e8399d3893f22a0c2c1e50fd781f37a45b7 (diff) | |
download | scala-b06edbc46d2b08752f6bd751f030a166c7628c98.tar.gz scala-b06edbc46d2b08752f6bd751f030a166c7628c98.tar.bz2 scala-b06edbc46d2b08752f6bd751f030a166c7628c98.zip |
Made constructors of top level objects private
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index c8dfb02ce3..6fab08f05a 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -1696,10 +1696,18 @@ abstract class GenJVM extends SubComponent { && !sym.enclClass.hasFlag(Flags.INTERFACE) && !sym.isClassConstructor) ACC_FINAL else 0) jf = jf | (if (sym.isStaticMember) ACC_STATIC else 0) + if (settings.target.value == "jvm-1.5") jf = jf | (if (sym hasFlag Flags.BRIDGE) ACC_BRIDGE | ACC_SYNTHETIC else 0) + if (sym.isClass && !sym.hasFlag(Flags.INTERFACE)) jf = jf | ACC_SUPER + + // constructors of module classes should be private + if (sym.isPrimaryConstructor && isTopLevelModule(sym.owner)) { + jf |= ACC_PRIVATE + jf &= ~ACC_PUBLIC + } jf } |