mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fixes incorrect optimization of try/catch statements
This commit is contained in:
parent
1f18148144
commit
43acca8706
|
@ -551,8 +551,12 @@ class OptimizingVisitor implements StatementVisitor, ExprVisitor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(TryCatchStatement statement) {
|
public void visit(TryCatchStatement statement) {
|
||||||
processSequence(statement.getProtectedBody());
|
List<Statement> statements = processSequence(statement.getProtectedBody());
|
||||||
processSequence(statement.getHandler());
|
statement.getProtectedBody().clear();
|
||||||
|
statement.getProtectedBody().addAll(statements);
|
||||||
|
statements = processSequence(statement.getHandler());
|
||||||
|
statement.getHandler().clear();
|
||||||
|
statement.getHandler().addAll(statements);
|
||||||
resultStmt = statement;
|
resultStmt = statement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user