Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match allows array-port overwrite #636

Open
dorian3343 opened this issue May 15, 2024 · 1 comment
Open

Match allows array-port overwrite #636

dorian3343 opened this issue May 15, 2024 · 1 comment
Labels

Comments

@dorian3343
Copy link
Collaborator

You can overwrite a matches array port, which creates an infinite loop. I'd expect for it to throw an error.

Example:

:data -> match:data
'H' -> match:case[0] -> ('Hello, World!' -> println -> :sig)
'Q' -> match:case[0] -> ('Hello, World!' -> println -> :sig)
@emil14
Copy link
Collaborator

emil14 commented May 15, 2024

I would say that's normal behaviour

You're not "overwriting" you sending to the same inport from several different places i.e. you merge several flows into one

We could in theory ban this for array-inports and say like "unlike regular inport, array-inport slot can only have one source of data" but that could lead to unexpected limitations in the future

I personally would like to see this solved as a special case in linter, when we'll have it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants