branch: master
commit 3603bc4547eddf4443924ad1b38875246391d733
Author: Carl Lei <[email protected]>
Commit: Carl Lei <[email protected]>

    Add test on shorthand method name and scoping
---
 tests/parser.el |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/parser.el b/tests/parser.el
index 17519ca..650bac8 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}};")
 

Reply via email to