We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
module main @[params] struct Params { mut: a bool } fn foo(mut opts Params) { // ... processing, goal is to eventually have it accessible inside the function, recursively using it. // opts.a = true // foo(opts) println('') } fn main() { foo() // Below works. // mut p := Params{a: 1} // foo(mut p) }
above
params optionally passing params struct
error: function `foo` parameter `opts` is `mut`, so use `mut Params{....}` instead 1 | module main | ^ 2 | 3 | @[params]
No response
v0.4.5
linux, amd64
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
@[params]
ttytm
Successfully merging a pull request may close this issue.
Describe the bug
Reproduction Steps
above
Expected Behavior
params optionally passing params struct
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
v0.4.5
Environment details (OS name and version, etc.)
linux, amd64
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: