diff --git a/core/src/main/java/org/teavm/model/analysis/ClassInitializerAnalysis.java b/core/src/main/java/org/teavm/model/analysis/ClassInitializerAnalysis.java index a036d44b2..b439ae005 100644 --- a/core/src/main/java/org/teavm/model/analysis/ClassInitializerAnalysis.java +++ b/core/src/main/java/org/teavm/model/analysis/ClassInitializerAnalysis.java @@ -289,6 +289,9 @@ public class ClassInitializerAnalysis implements ClassInitializerInfo { } analyze(className); + if (isDynamicInitializer(className)) { + methodInfo.anyFieldModified = true; + } } private void analyzeCalledMethod(MethodInfo calledMethod) {