Skip to content

Commit

Permalink
ClassfileParser: allow missing param names (for JDK 21)
Browse files Browse the repository at this point in the history
this is a forward port of scala/scala#10397 (fixing scala/bug#12783,
from which Scala 3 also suffers)
  • Loading branch information
SethTisue committed May 19, 2023
1 parent 4ffe5af commit 5038c9c
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -758,10 +758,12 @@ class ClassfileParser(
case tpnme.MethodParametersATTR =>
val paramCount = in.nextByte
for i <- 0 until paramCount do
val name = pool.getName(in.nextChar)
val index = in.nextChar
val flags = in.nextChar
if (flags & JAVA_ACC_SYNTHETIC) == 0 then
res.namedParams += (i -> name.name)
if index != 0 then
val name = pool.getName(index)
if (flags & JAVA_ACC_SYNTHETIC) == 0 then
res.namedParams += (i -> name.name)

case tpnme.AnnotationDefaultATTR =>
sym.addAnnotation(Annotation(defn.AnnotationDefaultAnnot, Nil, sym.span))
Expand Down

0 comments on commit 5038c9c

Please sign in to comment.