Wrote two tests that show that inlinefunctions doesn't affect classes and that
it returns void 0 for empty arrow functions
@@ -2533,4 +2533,19 @@ public class InlineFunctionsTest extends CompilerTestCase {
this.maxSizeAfterInlining =
CompilerOptions.UNLIMITED_FUN_SIZE_AFTER_INLINING;
}
+
+ public void testArrowFunctionUndefined() {
+ test("var empty = () => {}; empty();", "void 0;");
+ }
+
+ public void testFunctionProperty() {
+ testSame(
+ LINE_JOINER.join(
+ "function Foo() {",
+ " this.bar = 0;",
+ "}",
+ "var a = new Foo();",
+ "a.bar;"));
+ }
+
}
