Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1
-
None
Description
The following script fails to parse correctly
{if (0) 1 else 2; var x = 1;}
while the following script parses perfectly
{var x = 1; if (0) 1 else 2;}
Tested with
@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); }