From: Carl Lei Date: Thu, 15 Oct 2015 11:55:32 +0000 (+0800) Subject: Add test on shorthand method name and scoping X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/3603bc4547eddf4443924ad1b38875246391d733 Add test on shorthand method name and scoping --- diff --git a/tests/parser.el b/tests/parser.el index 17519cab5..650bac813 100644 --- a/tests/parser.el +++ b/tests/parser.el @@ -189,6 +189,11 @@ the test." (js2-deftest-parse object-literal-method "var x = {f(y) { return y;\n}};") +(js2-deftest object-literal-method-own-name-in-scope "({f(){f();}});" + (js2-mode) + (should (equal '("msg.undeclared.variable" "f") + (caar js2-parsed-warnings)))) + (js2-deftest-parse object-literal-getter-method "var x = {get f() { return 42;\n}};")