You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Xu Pengcheng (Jira)" <ji...@apache.org> on 2023/07/08 12:02:00 UTC
[jira] [Created] (JEXL-400) modify primitive value in lambda/function does not affect original value
Xu Pengcheng created JEXL-400:
---------------------------------
Summary: modify primitive value in lambda/function does not affect original value
Key: JEXL-400
URL: https://issues.apache.org/jira/browse/JEXL-400
Project: Commons JEXL
Issue Type: Bug
Reporter: Xu Pengcheng
{code:java}
let count = 0;
function inc() {
count ++;
// here count is 1
}
inc();
// here count is still 0{code}
It maybe not a 'bug', just seems making it as a global variable and keep the value consistently makes more sense.
Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)