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
A fix now would be to put a type on set_submap! so that new_node is only allowed to be a DynamicChoiceMap
A run of the test suite with this proposed fix suggests that the Gen internals currently rely on the ability to invoke Gen.set_submap! on a DynamicDSLChoiceMap, specifically in the following line of code:
The problem now is that the discard, which is a DynamicChoiceMap, may contain a submap that is of type DynamicDSLChoiceMap. If the user tries to call set_value! on the discard choicemap, they will obtain the error from the original post.
@fsaad could that line could change to use merge? Typing this quickly without staring so there could be an obvious problem but that seemed the one clear place in the API for sort-of-mutation on general ChoiceMaps.
This problem comes up because there is no interface method for setting values in a choice map. For example:
A fix now would be to put a type on
set_submap!
so thatnew_node
is only allowed to be aDynamicChoiceMap
, or something that supports[]
setting.The text was updated successfully, but these errors were encountered: