@@ -870,7 +870,7 @@ class ClassfileParser(
870870
871871 /** Parse inner classes. Expects `in.bp` to point to the superclass entry.
872872 * Restores the old `bp`.
873- * @return true iff classfile is from Scala, so no Java info needs to be read.
873+ * @return Some(unpickler) iff classfile is from Scala, so no Java info needs to be read.
874874 */
875875 def unpickleOrParseInnerClasses ()(using ctx : Context , in : DataReader ): Option [Embedded ] = {
876876 val oldbp = in.bp
@@ -999,7 +999,7 @@ class ClassfileParser(
999999 // attribute isn't, this classfile is a compilation artifact.
10001000 return Some (NoEmbedded )
10011001
1002- if (scan(tpnme.RuntimeVisibleAnnotationATTR ) || scan(tpnme.RuntimeInvisibleAnnotationATTR )) {
1002+ if (scan(tpnme.ScalaSignatureATTR ) && scan(tpnme.RuntimeVisibleAnnotationATTR )) {
10031003 val attrLen = in.nextInt
10041004 val nAnnots = in.nextChar
10051005 var i = 0
@@ -1010,14 +1010,10 @@ class ClassfileParser(
10101010 while (j < nArgs) {
10111011 val argName = pool.getName(in.nextChar)
10121012 if (argName.name == nme.bytes) {
1013- if ( attrClass == defn.ScalaSignatureAnnot )
1013+ if attrClass == defn.ScalaSignatureAnnot then
10141014 return unpickleScala(parseScalaSigBytes)
1015- else if ( attrClass == defn.ScalaLongSignatureAnnot )
1015+ else if attrClass == defn.ScalaLongSignatureAnnot then
10161016 return unpickleScala(parseScalaLongSigBytes)
1017- else if (attrClass == defn.TASTYSignatureAnnot )
1018- return unpickleTASTY(parseScalaSigBytes)
1019- else if (attrClass == defn.TASTYLongSignatureAnnot )
1020- return unpickleTASTY(parseScalaLongSigBytes)
10211017 }
10221018 parseAnnotArg(skip = true )
10231019 j += 1
0 commit comments