diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-07-02 16:11:50 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-07-23 14:49:01 +0200 |
commit | e511375a902e19cbed2340e7b66272692307df93 (patch) | |
tree | 50a9f34907b22153f74d4ab332171024a6b9fcd5 /src/compiler/scala/tools/nsc/symtab/classfile | |
parent | 1b5772316911e68ac0fb15a17390277f520e823a (diff) | |
download | scala-e511375a902e19cbed2340e7b66272692307df93.tar.gz scala-e511375a902e19cbed2340e7b66272692307df93.tar.bz2 scala-e511375a902e19cbed2340e7b66272692307df93.zip |
[backport] Fix superclass for Java interface symbols created in JavaMirrors
According to the spec [1] the superclass of an interface is always
Object.
Restores the tests that were moved to pending in bf951ec1,
fixex part of SI-9374.
[1] https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index 660028eab8..91355693ee 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -284,7 +284,7 @@ abstract class ClassfileParser { def getType(index: Int): Type = getType(null, index) def getType(sym: Symbol, index: Int): Type = sigToType(sym, getExternalName(index)) - def getSuperClass(index: Int): Symbol = if (index == 0) AnyClass else getClassSymbol(index) + def getSuperClass(index: Int): Symbol = if (index == 0) AnyClass else getClassSymbol(index) // the only classfile that is allowed to have `0` in the super_class is java/lang/Object (see jvm spec) private def createConstant(index: Int): Constant = { val start = starts(index) |