@@ -311,9 +311,10 @@ class ClassfileParser(
311
311
}
312
312
313
313
val isVarargs = denot.is(Flags .Method ) && (jflags & JAVA_ACC_VARARGS ) != 0
314
+ val isNative = (jflags & JAVA_ACC_NATIVE ) != 0
314
315
denot.info = sigToType(sig, isVarargs = isVarargs)
315
316
if (isConstructor) normalizeConstructorParams()
316
- denot.info = translateTempPoly(attrCompleter.complete(denot.info, isVarargs))
317
+ denot.info = translateTempPoly(attrCompleter.complete(denot.info, isVarargs, isNative ))
317
318
if (isConstructor) normalizeConstructorInfo()
318
319
319
320
if (ctx.explicitNulls) denot.info = JavaNullInterop .nullifyMember(denot.symbol, denot.info, isEnum)
@@ -687,7 +688,7 @@ class ClassfileParser(
687
688
var exceptions : List [NameOrString ] = Nil
688
689
var annotations : List [Annotation ] = Nil
689
690
var namedParams : Map [Int , TermName ] = Map .empty
690
- def complete (tp : Type , isVarargs : Boolean = false )(using Context ): Type = {
691
+ def complete (tp : Type , isVarargs : Boolean = false , isNative : Boolean = false )(using Context ): Type = {
691
692
val updatedType =
692
693
if sig == null then tp
693
694
else {
@@ -704,6 +705,8 @@ class ClassfileParser(
704
705
else updatedType
705
706
706
707
annotations.foreach(annot => sym.addAnnotation(annot))
708
+ if isNative then
709
+ sym.addAnnotation(Annotation (defn.NativeAnnot ))
707
710
708
711
exceptions.foreach { ex =>
709
712
val cls = getClassSymbol(ex.name)
0 commit comments