mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibJS/Bytecode: Perform ToNumeric on accumulator before postfix inc/dec
This ensures we get the expected behavior of code like: let a = [] let b = a++ (Where b should be 0, not [], because JavaScript.)
This commit is contained in:
parent
c9bd324369
commit
d364d99cb8
Notes:
sideshowbarker
2024-07-16 22:18:54 +09:00
Author: https://github.com/awesomekling
Commit: d364d99cb8
Pull-request: https://github.com/SerenityOS/serenity/pull/19416
4 changed files with 26 additions and 0 deletions
|
@ -88,6 +88,7 @@
|
|||
O(SuperCall) \
|
||||
O(Throw) \
|
||||
O(ThrowIfNotObject) \
|
||||
O(ToNumeric) \
|
||||
O(Typeof) \
|
||||
O(TypeofVariable) \
|
||||
O(UnaryMinus) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue