mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
Fix precedence of 'void' keyword (fix #1079)
This commit is contained in:
parent
d2bf921018
commit
8b25d8a4bd
@ -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
|
||||
|
||||
@ -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
10
tests/test_void.js
Normal file
@ -0,0 +1,10 @@
|
||||
function f() {
|
||||
}
|
||||
|
||||
a = [
|
||||
void 0,
|
||||
void f,
|
||||
void f()
|
||||
];
|
||||
|
||||
result = a == ",,";
|
||||
Loading…
x
Reference in New Issue
Block a user