X 归档 2020-11-25
Wait, look at step 4g & 4h.
According to that comparing a BigInt to NaN (like `123n < Number.NaN`) is specified to return... undefined??!
I guess there is a coercion to boolean somewhere else in the spec because V8 returns false and `Boolean(undefined)` is false. https://t.co/Lc4NlKwTEF
According to that comparing a BigInt to NaN (like `123n < Number.NaN`) is specified to return... undefined??!
I guess there is a coercion to boolean somewhere else in the spec because V8 returns false and `Boolean(undefined)` is false. https://t.co/Lc4NlKwTEF
等等,看看 4g 和 4h 步骤。
照那个说法,BigInt 与 NaN 比较(比如 `123n < Number.NaN`)按规范会返回……undefined??!
我猜规范里其他地方会有到布尔的强制转换,因为 V8 返回 false,而 `Boolean(undefined)` 是 false。 https://t.co/Lc4NlKwTEF
照那个说法,BigInt 与 NaN 比较(比如 `123n < Number.NaN`)按规范会返回……undefined??!
我猜规范里其他地方会有到布尔的强制转换,因为 V8 返回 false,而 `Boolean(undefined)` 是 false。 https://t.co/Lc4NlKwTEF
@DasSurma https://tc39.es/ecma262/#sec-relational-operators-runtime-semantics-evaluation Final step just turns `undefined` into `false`
@DasSurma https://tc39.es/ecma262/#sec-relational-operators-runtime-semantics-evaluation 最后一步只是把 `undefined` 变成 `false`
Wait, look at step 4g & 4h.
According to that comparing a BigInt to NaN (like `123n < Number.NaN`) is specified to return... undefined??!
I guess there is a coercion to boolean somewhere else in the spec because V8 returns false and `Boolean(undefined)` is false.
According to that comparing a BigInt to NaN (like `123n < Number.NaN`) is specified to return... undefined??!
I guess there is a coercion to boolean somewhere else in the spec because V8 returns false and `Boolean(undefined)` is false.
等等,看看 4g 和 4h 步骤。
照那个说法,BigInt 与 NaN 比较(比如 `123n < Number.NaN`)按规范会返回……undefined??!
我猜规范里其他地方会有到布尔的强制转换,因为 V8 返回 false,而 `Boolean(undefined)` 是 false。
照那个说法,BigInt 与 NaN 比较(比如 `123n < Number.NaN`)按规范会返回……undefined??!
我猜规范里其他地方会有到布尔的强制转换,因为 V8 返回 false,而 `Boolean(undefined)` 是 false。

