"no viable alternative at input ..." for simple struct creation #661
-
Hey folks! Amazing project, it's been on my list of things to play with for a long time but only finally getting to it now! Simple question that I couldn't figure out the answer for myself. I have the following code:
This ends up in the following compilation error:
I was able to work around the problem by creating a local variable of the required type as follows:
Is there a more elegant way to do this? I am using P installed from Homebrew on macOS:
Thanks in advance and very much looking forward to getting deeper with P! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Please replace Let us know your feedback as you explore P more. @pcholakov |
Beta Was this translation helpful? Give feedback.
Please replace
announce PromiseInit, (id = i);
withannounce PromiseInit, (id = i,);
. For the compiler to distinguish single field tuple values from()
. thanks!Let us know your feedback as you explore P more. @pcholakov