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
Risor seems to have an issue performing either -= or += operations on numerical fields contained within Go structs, though it can assign them fine.
-=
+=
For example, this doesn't work:
package main import ( "context" "github.com/risor-io/risor" ) type Object struct { A int } func main() { src := "Object.A -= 1" _, err := risor.Eval(context.Background(), src, risor.WithGlobal("Object", &Object{})) if err != nil { panic(err) } }
But this does:
package main import ( "context" "github.com/risor-io/risor" ) type Object struct { A int } func main() { src := "Object.A = Object.A - 1" _, err := risor.Eval(context.Background(), src, risor.WithGlobal("Object", &Object{})) if err != nil { panic(err) } }
EDIT: This is probably tied to #307.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Risor seems to have an issue performing either
-=
or+=
operations on numerical fields contained within Go structs, though it can assign them fine.For example, this doesn't work:
But this does:
EDIT: This is probably tied to #307.
The text was updated successfully, but these errors were encountered: