Title: 
  The parser will throw exception if closure used with arguments in a new object creation syntax
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/CannotReproduce
Reporter/Name(from Bugbase): Luis Majano / ()
Created: 03/29/2018
Components: Language, Functions
Versions: 2016
Failure Type: Others
Found In Build/Fixed In Build: latest /
Priority/Frequency: Normal /
Locale/System: / Linux All
Vote Count: 0
Problem Description:
if you have the following code:
var consumerValue = "";
                new cbstreams.Optional()
                    .of( "luis" )
                    .ifPresent( function( e ){
                        consumerValue = e;
                    } );
                expect( consumerValue ).toBe( "luis" );
The parser will explode in the closure of the ifPresent() function because it has incoming arguments.
If you remove the e argument, it compiles. if you do an assignment it compiles.  But inline it blows up.
var consumerValue = "";
                var optional = new cbstreams.Optional().of( "luis" );
                    optional
                    .ifPresent( function( e ){
                        consumerValue = e;
                    } );
                expect( consumerValue ).toBe( "luis" );
  Attachments:
Comments: