Fix precedence of 'void' keyword (fix #1079)

This commit is contained in:
Gordon Williams 2017-02-27 15:10:58 +00:00
parent d2bf921018
commit 8b25d8a4bd
3 changed files with 12 additions and 1 deletions

View File

@ -11,6 +11,7 @@
Pico/WiFi: Allow USB HID to work on Windows (from @nailxx)
Allow Puck.js/nRF52 devices to drive Neopixel/WS281x/APA10x LEDs with E.neopixelWrite (fix #1023)
Fix crash in JSON.stringify for zero-length typed arrays
Fix precedence of 'void' keyword (fix #1079)
1v91 : Fix recent regression if no Boot Code defined at startup
Fix handling of return of rejected promise within a promise

View File

@ -1553,7 +1553,7 @@ NO_INLINE JsVar *jspeFactor() {
return jspeFactorTypeOf();
} else if (lex->tk==LEX_R_VOID) {
JSP_ASSERT_MATCH(LEX_R_VOID);
jsvUnLock(jspeFactor());
jsvUnLock(jspeUnaryExpression());
return 0;
}
JSP_MATCH(LEX_EOF);

10
tests/test_void.js Normal file
View File

@ -0,0 +1,10 @@
function f() {
}
a = [
void 0,
void f,
void f()
];
result = a == ",,";