nevalang / neva

🌊 Dataflow programming language with static types and implicit parallelism. Compiles to native code and Go
https://nevalang.org
MIT License
91 stars 7 forks source link

Fan-In + unnamed port does not work #700

Open emil14 opened 1 week ago

emil14 commented 1 week ago

This code lead to error examples/reduce_list port not found: reduce/__fanIn__10/in:data[1]

pub flow Reduce<T, Y>(data stream<T>, init Y) (res Y) {
    handler IReduceHandler<T, Y>
    fanOut FanOut<stream<T>>
    acc Accumulator<Y>

    ---

    [:init, handler] -> acc:data // <=== HERE

    :data -> fanOut

    fanOut[0].data -> handler:el

    fanOut[1].last -> acc:last

    acc:cur -> handler:acc

    handler:res -> acc:data

    acc:res -> :res
}

if we change handler to handler:res there's no such error