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
xst -e 'const store = new Map([[1n, "abc"]]); print(store.get(1n))'
See undefined
Expected behavior
print abc
Other information
I thought maybe a Map's key had to be an Object, but that's WeakMap. "A Map's keys can be any value (including functions, objects, or any primitive)." -- MDN
I checked the XS conformance docs and didn't find anything about this. That suggests test262 doesn't cover this. odd, that.
node and browser consoles both show...
> const store = new Map([[1n, "abc"]]); store.get(1n)
'abc'
Nice find. It looks like test262 doesn't have a case for this.
It looks pretty easy to add. In fxTestEntry add this after the reference case:
else if ((XS_BIGINT_KIND == a->kind) || (XS_BIGINT_X_KIND == a->kind))
result = gxTypeBigInt.compare(the, 0, 1, 0, a, b);
That's enough to make it work, but all the BigInt values will share a hash table entry which is eventually slow. So, in fxSumEntry add this after the reference case:
Steps to Reproduce
xst -e 'const store = new Map([[1n, "abc"]]); print(store.get(1n))'
undefined
Expected behavior
print abc
Other information
I thought maybe a Map's key had to be an Object, but that's WeakMap. "A Map's keys can be any value (including functions, objects, or any primitive)." -- MDN
I checked the XS conformance docs and didn't find anything about this. That suggests test262 doesn't cover this. odd, that.
node and browser consoles both show...
context:
As part of Agoric/agoric-sdk#2486 , I'm running zoe/test/unitTests/test-fakePriceAuthority.js and the assertion at store.js line 35 is failing.
cc @erights @katelynsills
Build environment: linux
Target device: xst, xsnap, agoric
The text was updated successfully, but these errors were encountered: