Series reference to non-literals
The references to Series
objects, used at several places, work nicely if the Series
is a literal or part of Table
literal. If the object is returned by a function or expression then it cannot be processed via reference. Some examples here:
t = ((number: 1, 2))
s = t.number
# errors during type check:
# File "vre-language/src/virtmat/language/constraints/typechecks.py", line 431, in iterable_property_type
# assert isinstance_r(self, ['Series'])
# AssertionError
m = map((x: x > 1), s)
print(m[0])
f = filter((x: x > 1), t.number)
print(f[0])
m1 = map((x: 2*x), s)
f1 = filter((x: x > 1), m1)
print(f1[0])
# semantic errors in the final parser phase where the references in the model are set:
# Unknown object "t1.number" of class "Series"
t1 = t where number > 1
print(t1.number)