File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
compiler/src/dotty/tools/dotc/core/classfile Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ class ClassfileParser(
275275 def complete (denot : SymDenotation )(using Context ): Unit = {
276276 val sym = denot.symbol
277277 val isEnum = (jflags & JAVA_ACC_ENUM ) != 0
278+ val isNative = (jflags & JAVA_ACC_NATIVE ) != 0
278279 val isConstructor = name eq nme.CONSTRUCTOR
279280
280281 /** Strip leading outer param from constructor and trailing access tag for
@@ -313,6 +314,10 @@ class ClassfileParser(
313314 val isVarargs = denot.is(Flags .Method ) && (jflags & JAVA_ACC_VARARGS ) != 0
314315 denot.info = sigToType(sig, isVarargs = isVarargs)
315316 if (isConstructor) normalizeConstructorParams()
317+ if isNative then
318+ attrCompleter.annotations ::= Annotation .deferredSymAndTree(defn.NativeAnnot ) {
319+ New (defn.NativeAnnot .typeRef, Nil )
320+ }
316321 denot.info = translateTempPoly(attrCompleter.complete(denot.info, isVarargs))
317322 if (isConstructor) normalizeConstructorInfo()
318323
You can’t perform that action at this time.
0 commit comments