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
We should add a new special kind of function as an allowed expression, being using (numeric) indices to access elements of an array or list.
Since we want to support this on the generic TESTed type sequence, we must consider the following cases:
How would we track the type of the array/list? For example, in Java, depending if the sequence is an array or a list, the syntax is different. Since we don't track the types of variables, we could work with helper functions, that use the correct notation at runtime.
The Python syntax (e.g. this_is_a_list[0]) can be used in the DSL. However, how would we differentiate array element access and dictionaries with numeric keys? See Support value access for dictionaries/maps #324.
The text was updated successfully, but these errors were encountered:
Another thing to consider is whether array access or dictionary access will be used most. One of them can be with the [] syntax, while the other will have to be with a function. We probably want to use the [] syntax for the most used one.
We should add a new special kind of function as an allowed expression, being using (numeric) indices to access elements of an array or list.
Since we want to support this on the generic TESTed type
sequence
, we must consider the following cases:array
or alist
, the syntax is different. Since we don't track the types of variables, we could work with helper functions, that use the correct notation at runtime.this_is_a_list[0]
) can be used in the DSL. However, how would we differentiate array element access and dictionaries with numeric keys? See Support value access for dictionaries/maps #324.The text was updated successfully, but these errors were encountered: