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
Performance issue: top-level field value evaluated twice.
kcl run for file:
show = lambda s -> str { print("show: ${s}") s } # `_foo` usage before declaration foo = _foo _foo = { name: "foo" value: show("foo") } _bar = { name: "bar" value: show("bar") } # `_bar` usage after declaration bar = _bar
I expect single show: foo and show: bar lines:
show: foo
show: bar
show: foo show: bar foo: name: foo value: foo bar: name: bar value: bar
show: foo show: foo show: bar foo: name: foo value: foo bar: name: bar value: bar
0.10.9-linux-amd64
The text was updated successfully, but these errors were encountered:
kcl run
_i = { _c = 0 } show = lambda s -> str { _c = _i._c _i._c = _c + 1 print("show: ${_c}") "${_c}" } foo1 = foo foo2 = foo foo = { name: "foo" value: show("foo") } foo3 = foo
Output:
show: 0 show: 1 foo1: name: foo value: '0' foo2: name: foo value: '0' foo: name: foo value: '1' foo3: name: foo value: '0'
Sorry, something went wrong.
He1pa
No branches or pull requests
Bug Report
Performance issue: top-level field value evaluated twice.
1. Minimal reproduce step (Required)
kcl run for file:
2. What did you expect to see? (Required)
I expect single
show: foo
andshow: bar
lines:3. What did you see instead (Required)
4. What is your KCL components version? (Required)
The text was updated successfully, but these errors were encountered: