mirror of
https://github.com/fluencelabs/aqua.git
synced 2025-03-15 03:30:49 +00:00
20 lines
471 B
Plaintext
20 lines
471 B
Plaintext
aqua StreamArgs
|
|
|
|
export lng280BugWithForEmptyStreamFunc
|
|
|
|
service StreamService("test-service"):
|
|
store(numbers: []u32, n: u32)
|
|
|
|
func callService(stream: *u32, n: u32):
|
|
stream <<- 1
|
|
StreamService.store(stream, n)
|
|
|
|
func returnEmptyStream() -> *u32:
|
|
<- *[]
|
|
|
|
func lng280BugWithForEmptyStreamFunc():
|
|
arr = [1,2,3,4,5]
|
|
for a <- arr:
|
|
str <- returnEmptyStream()
|
|
-- passing the function directly won't work, see LNG-290
|
|
callService(str, a) |