When accessing the elements of a concatenated stream, the concatenated elements are missing when accessing the stream a second time. In any case the elements passed in the stream(...) call are always available.
Langium version: 3.0.0
Package name: Langium
Code example:
const countTest = stream([1]).concat([2])
countTest.count()
countTest.toArray() // returns [ 1 ] but expected was [1, 2]
const toStringTest = stream([1]).concat([2])
toStringTest.toString()
toStringTest.toArray() // returns [ 1 ] but expected was [1 , 2]
const findTest = stream([1]).concat([2])
findTest.some((it: number) => it === 2) //returns true
findTest.some((it: number) => it === 2) //returns false but expected was true
This problem really seems to be specific to streams concatenations because i tried other variants of the code above with stream([1], [2]) or stream([1], stream([2])) and all of those work.
When accessing the elements of a concatenated stream, the concatenated elements are missing when accessing the stream a second time. In any case the elements passed in the
stream(...)
call are always available.Langium version: 3.0.0 Package name: Langium
Code example:
This problem really seems to be specific to streams concatenations because i tried other variants of the code above with
stream([1], [2])
orstream([1], stream([2]))
and all of those work.