You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is, calling a method on a block. In Noir it gives a syntax error, but it should be allowed too.
(both Rust and Noir disallow other type of expressions after a block, for example making a function call like { 1 }(2, 3) because that could be a call or a block followed by a tuple, and both Rust and Noir default to the latter, but with method calls there's no ambiguity)
Aim
Apparently Rust supports this syntax:
That is, calling a method on a block. In Noir it gives a syntax error, but it should be allowed too.
(both Rust and Noir disallow other type of expressions after a block, for example making a function call like
{ 1 }(2, 3)
because that could be a call or a block followed by a tuple, and both Rust and Noir default to the latter, but with method calls there's no ambiguity)(found while working on #7613)
Expected Behavior
The above code should parse in Noir as well.
Bug
It gives a syntax error.
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: