JS inline: fixed bug with simple return inline function, when result is not used.
When function body can be expression (contains only one statement, and it's return), result was saved to resultExpr, not body. But when result was not used, resultExpr was not used then. Fixed by checking, that result is used in first place.
This commit is contained in:
@@ -248,6 +248,10 @@ public final class InlineTest extends SingleFileTranslationTest {
|
||||
public void testIncrementProperty() throws Exception {
|
||||
checkFooBoxIsOkWithInlineDirectives();
|
||||
}
|
||||
|
||||
public void testSimpleReturnFunctionWithResultUnused() throws Exception {
|
||||
checkFooBoxIsOkWithInlineDirectives();
|
||||
}
|
||||
|
||||
private void checkFooBoxIsOkWithInlineDirectives() throws Exception {
|
||||
checkFooBoxIsOk();
|
||||
|
||||
Reference in New Issue
Block a user