You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2025/05/30 09:21:00 UTC
[jira] [Comment Edited] (JEXL-439) When using reference capture, incorrect scoping when local variable shades a captured one in stack frame.
[ https://issues.apache.org/jira/browse/JEXL-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955155#comment-17955155 ]
Henri Biestro edited comment on JEXL-439 at 5/30/25 9:20 AM:
-------------------------------------------------------------
This issue is only meant for tracking; the initial report and solution are in JEXL-426.
Commit [e5f4f5f8|https://github.com/apache/commons-jexl/commit/e5f4f5f8934152d9b75c245ffe526867c951a89e]
was (Author: henrib):
This issue is only meant for tracking; the initial report and solution are in JEXL-426.
> When using reference capture, incorrect scoping when local variable shades a captured one in stack frame.
> ---------------------------------------------------------------------------------------------------------
>
> Key: JEXL-439
> URL: https://issues.apache.org/jira/browse/JEXL-439
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.5.0
> Reporter: Xu Pengcheng
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.5.1
>
>
> In relation to JEXL-426, the dynamic scope is wrongly managed when a captured variable (ie a lexical variable defined at top-level) is overridden in a function (same symbol is used to name local lexical variable) and this function calls another that captures the top-level variable.
> With reference capture, when a symbol is captured, the call frame ensures captured variables are wrapped into a reference ensuring the 'pass by reference' behavior. The culprit here is that when redefining the variable, that new variable must be wrapped, not pass the previous one.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)