Review request for JDK-8144711: (x) => x + 1 causes Assertion failure instead of SyntaxError

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Wed May 4 10:47:55 UTC 2016


+1


On 5/4/2016 4:06 PM, Hannes Wallnoefer wrote:
> Thanks Michael,
>
> I uploaded a new webrev that makes sure code does not pass.
>
> http://cr.openjdk.java.net/~hannesw/8144711/webrev.01/
>
> Hannes
>
>
> Am 2016-05-04 um 11:08 schrieb Michael Haupt:
>> Hi Hannes,
>>
>> hang on; one note: the test will "succeed" if the parser throws no
>> exception. It should probably verify that there is an exception in
>> the first place:
>>
>> caught = false
>> try {
>>    ...
>> } catch (e) {
>>    assert ...
>>    caught = true
>> }
>> Assert.assertTrue(caught)
>>
>> Best,
>>
>> Michael
>>
>>> Am 04.05.2016 um 11:05 schrieb Michael Haupt
>>> <michael.haupt at oracle.com>:
>>>
>>> Hi Hannes,
>>>
>>> lower-case thumbs up!
>>>
>>> Best,
>>>
>>> Michael
>>>
>>>> Am 04.05.2016 um 10:49 schrieb Hannes Wallnoefer
>>>> <hannes.wallnoefer at oracle.com <mailto:hannes.wallnoefer at oracle.com>>:
>>>>
>>>> Please review JDK-8144711: (x) => x + 1 causes Assertion failure
>>>> instead of SyntaxError:
>>>>
>>>> http://cr.openjdk.java.net/~hannesw/8144711/
>>>> <http://cr.openjdk.java.net/~hannesw/8144711/>
>>>>
>>>> Thanks,
>>>> Hannes
>>
>



More information about the nashorn-dev mailing list