diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-06-08 05:44:58 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-06-08 05:44:58 -0700 |
commit | 0243fa99b238e1abdf11de8769c832e51ee33099 (patch) | |
tree | 609ba32c6b57aad2e7703f9e3b66a29cdfb61cdc | |
parent | d6a57968921b3c158d2414f8913be89d98beb541 (diff) | |
parent | f47870da6db82686d28a6f44bbb4fdcaac5369df (diff) | |
download | scala-0243fa99b238e1abdf11de8769c832e51ee33099.tar.gz scala-0243fa99b238e1abdf11de8769c832e51ee33099.tar.bz2 scala-0243fa99b238e1abdf11de8769c832e51ee33099.zip |
Merge pull request #678 from magarciaEPFL/fixes
counterpart in GenASM to 241c7606d0bf5f3209b9d549fb75
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index b8cf4eca9f..4b903cf556 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala @@ -283,12 +283,16 @@ abstract class GenASM extends SubComponent with BytecodeWriters { && !sym.isMutable // lazy vals and vars both
)
+ // Primitives are "abstract final" to prohibit instantiation
+ // without having to provide any implementations, but that is an
+ // illegal combination of modifiers at the bytecode level so
+ // suppress final if abstract if present.
import asm.Opcodes._
mkFlags(
if (privateFlag) ACC_PRIVATE else ACC_PUBLIC,
if (sym.isDeferred || sym.hasAbstractFlag) ACC_ABSTRACT else 0,
if (sym.isInterface) ACC_INTERFACE else 0,
- if (finalFlag) ACC_FINAL else 0,
+ if (finalFlag && !sym.hasAbstractFlag) ACC_FINAL else 0,
if (sym.isStaticMember) ACC_STATIC else 0,
if (sym.isBridge) ACC_BRIDGE | ACC_SYNTHETIC else 0,
if (sym.isClass && !sym.isInterface) ACC_SUPER else 0,
|