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; }