mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -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
|
||||
public void visit(TryCatchStatement statement) {
|
||||
processSequence(statement.getProtectedBody());
|
||||
processSequence(statement.getHandler());
|
||||
List<Statement> statements = processSequence(statement.getProtectedBody());
|
||||
statement.getProtectedBody().clear();
|
||||
statement.getProtectedBody().addAll(statements);
|
||||
statements = processSequence(statement.getHandler());
|
||||
statement.getHandler().clear();
|
||||
statement.getHandler().addAll(statements);
|
||||
resultStmt = statement;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user