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 2021/06/07 13:15:06 UTC
[jira] [Closed] (JEXL-303) Block syntax is broken
[ https://issues.apache.org/jira/browse/JEXL-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro closed JEXL-303.
------------------------------
> Block syntax is broken
> ----------------------
>
> Key: JEXL-303
> URL: https://issues.apache.org/jira/browse/JEXL-303
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Dmitri Blinov
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.2
>
>
> The following script fails to parse correctly
> {code}
> {if (0) 1 else 2; var x = 1;}
> {code}
> while the following script parses perfectly
> {code}
> {var x = 1; if (0) 1 else 2;}
> {code}
> Tested with
> {code}
> @Test
> public void testOuterBlock() throws Exception {
> JexlScript e = JEXL.createScript("{if (0) 1 else 2; var x = 1;}");
> JexlContext jc = new MapContext();
> Object o = e.execute(jc);
> Assert.assertEquals("Block result is wrong", 1, o);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)