From d1fa57210ea4866a1e568446004ad83add15fed8 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 1 Feb 2021 14:41:18 +0300 Subject: [PATCH] Copy parameter annotations when renaming a class --- core/src/main/java/org/teavm/parsing/ClassRefsRenamer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/org/teavm/parsing/ClassRefsRenamer.java b/core/src/main/java/org/teavm/parsing/ClassRefsRenamer.java index 40a079964..a402b0285 100644 --- a/core/src/main/java/org/teavm/parsing/ClassRefsRenamer.java +++ b/core/src/main/java/org/teavm/parsing/ClassRefsRenamer.java @@ -129,6 +129,10 @@ public class ClassRefsRenamer extends AbstractInstructionVisitor { renamedMethod.setLevel(method.getLevel()); renamedMethod.setProgram(method.getProgram()); rename(method.getAnnotations(), renamedMethod.getAnnotations()); + for (int i = 0; i < method.parameterCount(); ++i) { + rename(method.parameterAnnotation(i), renamedMethod.parameterAnnotation(i)); + } + if (renamedMethod.getProgram() != null) { rename(renamedMethod.getProgram()); }