[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2c459c6 29/31: Merge pull request #436 from felipeochoa/is
From: |
Dmitry Gutov |
Subject: |
[elpa] master 2c459c6 29/31: Merge pull request #436 from felipeochoa/issue429 |
Date: |
Fri, 21 Jul 2017 09:04:59 -0400 (EDT) |
branch: master
commit 2c459c633d0d1c031c857fb547c35891c97e0d81
Merge: 890cf81 867919e
Author: Dmitry Gutov <address@hidden>
Commit: GitHub <address@hidden>
Merge pull request #436 from felipeochoa/issue429
Always consider `await` to have side-effects
---
js2-mode.el | 3 +--
tests/parser.el | 5 +++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/js2-mode.el b/js2-mode.el
index dca862a..3877105 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -5173,8 +5173,7 @@ You should use `js2-print-tree' instead of this function."
(or (js2-node-has-side-effects expr)
(when (js2-string-node-p expr)
(member (js2-string-node-value expr) '("use strict" "use
asm"))))))
- ((= tt js2-AWAIT)
- (js2-node-has-side-effects (js2-unary-node-operand node)))
+ ((= tt js2-AWAIT) t)
((= tt js2-COMMA)
(js2-node-has-side-effects (js2-infix-node-right node)))
((or (= tt js2-AND)
diff --git a/tests/parser.el b/tests/parser.el
index c81ac0b..482ec8f 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -1295,3 +1295,8 @@ the test."
(let ((js2-instanceof-has-side-effects t))
(js2-mode--and-parse)
(should (null js2-parsed-warnings))))
+
+(js2-deftest await-has-side-effects
+ "const p = new Promise();\nasync function f() { await p; return null; }"
+ (js2-mode--and-parse)
+ (should (null js2-parsed-warnings)))
- [elpa] master b3f74f0 19/31: Fix jsdoc highlighting for tags w/ optional braces, (continued)
- [elpa] master b3f74f0 19/31: Fix jsdoc highlighting for tags w/ optional braces, Dmitry Gutov, 2017/07/21
- [elpa] master 9ce2542 07/31: Add support for ES7 class public fields, Dmitry Gutov, 2017/07/21
- [elpa] master 7349309 21/31: Add tests for `/*jslint*/` declarations, Dmitry Gutov, 2017/07/21
- [elpa] master b176925 24/31: Update NEWS.md, Dmitry Gutov, 2017/07/21
- [elpa] master 92a8857 23/31: Support async arrow function without parentheses, Dmitry Gutov, 2017/07/21
- [elpa] master 890cf81 27/31: Merge pull request #434 from lelit/issue420, Dmitry Gutov, 2017/07/21
- [elpa] master 558f53f 22/31: Merge pull request #358 from JulianKniephoff/master, Dmitry Gutov, 2017/07/21
- [elpa] master cb57d9b 30/31: Bump the version, Dmitry Gutov, 2017/07/21
- [elpa] master a604872 26/31: Recognize initialized variable in destructuring object assignment, Dmitry Gutov, 2017/07/21
- [elpa] master f1badee 18/31: Replace (equal nil ...) with (null ...), Dmitry Gutov, 2017/07/21
- [elpa] master 2c459c6 29/31: Merge pull request #436 from felipeochoa/issue429,
Dmitry Gutov <=
- [elpa] master 3df50ab 17/31: Add option js2-getprop-has-side-effects (#424), Dmitry Gutov, 2017/07/21
- [elpa] master 867919e 28/31: Always consider `await` to have side-effects, Dmitry Gutov, 2017/07/21
- [elpa] master 97d27d6 15/31: Put the visitor and printer properties on unprefixed symbols as well, Dmitry Gutov, 2017/07/21
- [elpa] master 231ac7f 31/31: Merge commit 'cb57d9b67390ae3ff70ab64169bbc4f1264244bc' from js2-mode, Dmitry Gutov, 2017/07/21