Skip to content

Commit 0399977

Browse files
authored
Merge pull request scala#6816 from lrytz/annotsCount
Increase the counter while looking for the ScalaSignature annotation
2 parents a3a87c4 + b8f6ebc commit 0399977

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,15 +1211,18 @@ abstract class ClassfileParser {
12111211
val numAnnots = u2
12121212
var i = 0
12131213
var bytes: Array[Byte] = null
1214-
while (i < numAnnots && bytes == null) pool.getType(u2) match {
1215-
case SigTpe =>
1216-
checkScalaSigAnnotArg()
1217-
bytes = parseScalaSigBytes()
1218-
case LongSigTpe =>
1219-
checkScalaSigAnnotArg()
1220-
bytes = parseScalaLongSigBytes()
1221-
case _ =>
1222-
skipAnnotArgs()
1214+
while (i < numAnnots && bytes == null) {
1215+
pool.getType(u2) match {
1216+
case SigTpe =>
1217+
checkScalaSigAnnotArg()
1218+
bytes = parseScalaSigBytes()
1219+
case LongSigTpe =>
1220+
checkScalaSigAnnotArg()
1221+
bytes = parseScalaLongSigBytes()
1222+
case t =>
1223+
skipAnnotArgs()
1224+
}
1225+
i += 1
12231226
}
12241227

12251228
AnyRefClass // Force scala.AnyRef, otherwise we get "error: Symbol AnyRef is missing from the classpath"

0 commit comments

Comments
 (0)