Empty iterable as query result
If a query on an iterable does not return any elements, for example here:
s = (numbers: 1, 2, 3)
print(s where numbers > 3)
t = ((numbers: 1, 2, 3))
print(t where numbers > 3)
then an error occurs:
Unknown error: // --> print(s where numbers > 3) <--
It should return an empty iterable. Similar errors occur if we take a zero-size slice, e.g. print(t[0:0])
(should be empty table).
Also the following do not work:
-
print(t[-1])
raisesUnknown error
instead of returning(3)
. -
print(s[-1])
returns-1
andUnknown error
but should be3
-
print(s[3])
returns 3 andUnknown error
(should only be some more specific error like index error) -
print(s[4])
returns 4 andUnknown error
(should only be some more specific error like index error)