@@ -871,7 +871,7 @@ class ClassfileParser(
871871
872872 /** Parse inner classes. Expects `in.bp` to point to the superclass entry.
873873 * Restores the old `bp`.
874- * @return true iff classfile is from Scala, so no Java info needs to be read.
874+ * @return Some(unpickler) iff classfile is from Scala, so no Java info needs to be read.
875875 */
876876 def unpickleOrParseInnerClasses ()(using ctx : Context , in : DataReader ): Option [Embedded ] = {
877877 val oldbp = in.bp
@@ -1028,7 +1028,7 @@ class ClassfileParser(
10281028 // attribute isn't, this classfile is a compilation artifact.
10291029 return Some (NoEmbedded )
10301030
1031- if (scan(tpnme.RuntimeVisibleAnnotationATTR ) || scan(tpnme.RuntimeInvisibleAnnotationATTR )) {
1031+ if (scan(tpnme.ScalaSignatureATTR ) && scan(tpnme.RuntimeVisibleAnnotationATTR )) {
10321032 val attrLen = in.nextInt
10331033 val nAnnots = in.nextChar
10341034 var i = 0
@@ -1039,14 +1039,10 @@ class ClassfileParser(
10391039 while (j < nArgs) {
10401040 val argName = pool.getName(in.nextChar)
10411041 if (argName.name == nme.bytes) {
1042- if ( attrClass == defn.ScalaSignatureAnnot )
1042+ if attrClass == defn.ScalaSignatureAnnot then
10431043 return unpickleScala(parseScalaSigBytes)
1044- else if ( attrClass == defn.ScalaLongSignatureAnnot )
1044+ else if attrClass == defn.ScalaLongSignatureAnnot then
10451045 return unpickleScala(parseScalaLongSigBytes)
1046- else if (attrClass == defn.TASTYSignatureAnnot )
1047- return unpickleTASTY(parseScalaSigBytes)
1048- else if (attrClass == defn.TASTYLongSignatureAnnot )
1049- return unpickleTASTY(parseScalaLongSigBytes)
10501046 }
10511047 parseAnnotArg(skip = true )
10521048 j += 1
0 commit comments