@@ -871,7 +871,7 @@ class ClassfileParser(
871
871
872
872
/** Parse inner classes. Expects `in.bp` to point to the superclass entry.
873
873
* 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.
875
875
*/
876
876
def unpickleOrParseInnerClasses ()(using ctx : Context , in : DataReader ): Option [Embedded ] = {
877
877
val oldbp = in.bp
@@ -1028,7 +1028,7 @@ class ClassfileParser(
1028
1028
// attribute isn't, this classfile is a compilation artifact.
1029
1029
return Some (NoEmbedded )
1030
1030
1031
- if (scan(tpnme.RuntimeVisibleAnnotationATTR ) || scan(tpnme.RuntimeInvisibleAnnotationATTR )) {
1031
+ if (scan(tpnme.ScalaSignatureATTR ) && scan(tpnme.RuntimeVisibleAnnotationATTR )) {
1032
1032
val attrLen = in.nextInt
1033
1033
val nAnnots = in.nextChar
1034
1034
var i = 0
@@ -1039,14 +1039,10 @@ class ClassfileParser(
1039
1039
while (j < nArgs) {
1040
1040
val argName = pool.getName(in.nextChar)
1041
1041
if (argName.name == nme.bytes) {
1042
- if ( attrClass == defn.ScalaSignatureAnnot )
1042
+ if attrClass == defn.ScalaSignatureAnnot then
1043
1043
return unpickleScala(parseScalaSigBytes)
1044
- else if ( attrClass == defn.ScalaLongSignatureAnnot )
1044
+ else if attrClass == defn.ScalaLongSignatureAnnot then
1045
1045
return unpickleScala(parseScalaLongSigBytes)
1046
- else if (attrClass == defn.TASTYSignatureAnnot )
1047
- return unpickleTASTY(parseScalaSigBytes)
1048
- else if (attrClass == defn.TASTYLongSignatureAnnot )
1049
- return unpickleTASTY(parseScalaLongSigBytes)
1050
1046
}
1051
1047
parseAnnotArg(skip = true )
1052
1048
j += 1
0 commit comments