Fix JS DCE removing reachable functions

This commit is contained in:
Alexey Andreev
2017-10-09 20:12:03 +03:00
parent cb7d561c6c
commit 8cdef4139e
11 changed files with 108 additions and 13 deletions
+27
View File
@@ -0,0 +1,27 @@
(function(_, Kotlin) {
Kotlin.defineInlineFunction("bar", Kotlin.wrapFunction(function() {
function baz() {
return "bar";
}
return function() {
return baz();
};
}));
return _;
})(module.exports, require("kotlin"));
(function(_) {
function baz() {
return "baz";
}
function foo() {
return baz();
}
_.foo = foo;
})(module.exports);
// REQUEST_REACHABLE: main.foo
// ASSERT_REACHABLE: main.foo
// ASSERT_REACHABLE: baz