From 9e4e26ae18e5b8860cdb603e272450becd6e8d24 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 30 Mar 2017 17:20:19 +0300 Subject: [PATCH] Fix bug in metaprogramming API --- .../java/org/teavm/metaprogramming/impl/UsageGenerator.java | 1 + tools/idea/jps-common/teavm-jps-common.iml | 2 +- tools/idea/jps-plugin/teavm-jps-plugin.iml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/metaprogramming/impl/src/main/java/org/teavm/metaprogramming/impl/UsageGenerator.java b/metaprogramming/impl/src/main/java/org/teavm/metaprogramming/impl/UsageGenerator.java index 615e7f277..ff942d430 100644 --- a/metaprogramming/impl/src/main/java/org/teavm/metaprogramming/impl/UsageGenerator.java +++ b/metaprogramming/impl/src/main/java/org/teavm/metaprogramming/impl/UsageGenerator.java @@ -90,6 +90,7 @@ class UsageGenerator { private MethodDependency installAdditionalDependencies() { MethodDependency nameDep = agent.linkMethod(new MethodReference(Class.class, "getName", String.class), location); + nameDep.getVariable(0).propagate(agent.getType(Class.class.getName())); nameDep.getThrown().connect(methodDep.getThrown()); nameDep.use(); diff --git a/tools/idea/jps-common/teavm-jps-common.iml b/tools/idea/jps-common/teavm-jps-common.iml index d123bbdab..ee6bf7029 100644 --- a/tools/idea/jps-common/teavm-jps-common.iml +++ b/tools/idea/jps-common/teavm-jps-common.iml @@ -1,6 +1,6 @@ - + diff --git a/tools/idea/jps-plugin/teavm-jps-plugin.iml b/tools/idea/jps-plugin/teavm-jps-plugin.iml index 62279794c..79f94a998 100644 --- a/tools/idea/jps-plugin/teavm-jps-plugin.iml +++ b/tools/idea/jps-plugin/teavm-jps-plugin.iml @@ -1,6 +1,6 @@ - +