JoeStrout / minimicro-sysdisk

Contents of the /sys disk for the Mini Micro virtual computer
20 stars 11 forks source link

qa.namedMaps becomes useless on maps' modification #24

Closed marcgurevitx closed 7 months ago

marcgurevitx commented 7 months ago

If anything modifies the maps that serve as keys in qa.namedMaps, the subsequent qa.namedMaps[x] raises a "Key not found" error. It may affect qa.typeOf and qa.assertType.

]import "qa"
]
]qa.namedMaps[map]
map
]
]import "mapUtil"
]
]qa.namedMaps[map]
Runtime Error: Key Not Found: '{"hasIndex": FUNCTION(self, index), "
indexes": FUNCTION(self), "indexOf": FUNCTION(self, value, after), "
len": FUNCTION(self), "pop": FUNCTION(self), "push": FUNCTION(self,
value), "pull": FUNCTION(self), "shuffle": FUNCTION(self), "sum": FU
NCTION(self), "remove": FUNCTION(self, k), "replace": FUNCTION(self,
 oldval, newval, maxCount), "values": FUNCTION(self), "get": FUNCTIO
N(key, defaultValue), "hasValue": FUNCTION(v, includeInherited=0), "
sortedIndexes": FUNCTION(), "inverse": FUNCTION(), "filterIndexes":
FUNCTION(func), "filterValues": FUNCTION(func), "applyToValues": FUN
CTION(func), "pairs": FUNCTION(), "swap": FUNCTION(key1, key2)}' not
 found in map [line 1]
]
JoeStrout commented 7 months ago

Should be fixed as of yesterday. Thanks for the report.