From afac931c62d8d97c86a4150f43901c7d5042fac5 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sat, 1 Aug 2015 14:42:40 +0300 Subject: [PATCH] Fix bug in annotation support --- .../java/lang/reflect/AnnotationDependencyListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/reflect/AnnotationDependencyListener.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/reflect/AnnotationDependencyListener.java index b214d0eaa..4409675aa 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/reflect/AnnotationDependencyListener.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/lang/reflect/AnnotationDependencyListener.java @@ -220,7 +220,8 @@ public class AnnotationDependencyListener extends AbstractDependencyListener { if (value == null) { value = methodDecl.getAnnotationDefault(); } - params.add(generateAnnotationValue(agent, pe, methodDecl.getResultType(), value)); + params.add(generateAnnotationValue(agent, pe, methodDecl.getResultType(), value) + .cast(methodDecl.getResultType())); } return pe.construct(className, params.toArray(new ValueEmitter[params.size()]));