You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of the expression on line 2 is true, but getStaticValue() returns {value: false}.
This is probably because the two recursive calls to getStaticValueR() (evaluating the left and right sides of the BinaryExpression) both invoke Symbol() and so both return differentSymbols.
This could be resolved either by removing Symbol from callAllowed or by caching the static values of Identifiers encountered during recursion. However, the latter approach would still produce strange results if the user compared the returned static values of, for example, two different references to const symbol = Symbol();.
The text was updated successfully, but these errors were encountered:
Example:
The value of the expression on line 2 is
true
, butgetStaticValue()
returns{value: false}
.This is probably because the two recursive calls to
getStaticValueR()
(evaluating the left and right sides of the BinaryExpression) both invokeSymbol()
and so both return differentSymbols
.This could be resolved either by removing
Symbol
fromcallAllowed
or by caching the static values of Identifiers encountered during recursion. However, the latter approach would still produce strange results if the user compared the returned static values of, for example, two different references toconst symbol = Symbol();
.The text was updated successfully, but these errors were encountered: