[
https://issues.apache.org/jira/browse/JEXL-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168769#comment-15168769
]
Henri Biestro commented on JEXL-190:
------------------------------------
Hi Dimitri;
I'm not able to reproduce the issue. May be something in your context
implementation ?
My test code:
{code}
@Test
public void test180() throws Exception {
String sglobal = "z = (x)->{ return x + 1}; z(41)";
String slocal = "var t = (x)->{ return x + 41}; t(1)";
JexlContext jc = new MapContext();
JexlEngine jexl = new JexlBuilder().create();
JexlScript jglobal = jexl.createScript(sglobal);
Object oglobal = jglobal.execute(jc);
Assert.assertEquals(42, oglobal);
JexlScript jlocal = jexl.createScript(slocal);
Object olocal = jlocal.execute(jc);
Assert.assertEquals(42, olocal);
}
{code}
> function name within script is not resolved
> --------------------------------------------
>
> Key: JEXL-190
> URL: https://issues.apache.org/jira/browse/JEXL-190
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.0
> Reporter: Dmitri Blinov
> Assignee: Henri Biestro
>
> {code}
> z = function(x) { return x + 1}; return z(1)
> {code} returns error unsolvable function/method 'z' while
> {code}
> var z = function(x) { return x + 1}; return z(1)
> {code} returns 2
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)