From ab52f220c298a290b16c9a3820773cb75e5c0261 Mon Sep 17 00:00:00 2001 From: konsoletyper Date: Wed, 11 Mar 2015 20:33:13 +0300 Subject: [PATCH] Prevent async assigment from optimization --- .../src/main/java/org/teavm/javascript/OptimizingVisitor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java b/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java index f155919c4..718c86bbc 100644 --- a/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java +++ b/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java @@ -132,6 +132,9 @@ class OptimizingVisitor implements StatementVisitor, ExprVisitor { return; } AssignmentStatement assignment = (AssignmentStatement)last; + if (assignment.isAsync()) { + return; + } if (!(assignment.getLeftValue() instanceof VariableExpr)) { return; }