diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index eeeb3767bd34..0c701eb03d38 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -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))