jerryscript-project/jerryscript

A question about assert

Opened this issue · 0 comments

Version

Version: 3.0.0 ( 1a2c047 )

Execution steps

/root/.jsvu/jerry Testcase.js

Testcase

var foo = function(a, b = a) {
    function a() {
        return 2;
    }
    eval("assert(a() === 2)");
    eval("assert(b === 1)");
};
var r0 = 1;
var r1 = 1.4793169892429541;
var CallingResult = foo(r0, r1);
print(CallingResult);

Output

Script Error: assertion failed
Aborted (core dumped)

Expected behavior

ReferenceError: 'assert' is not defined

Description

I'm not sure how assert handled and why jerry returned differently than the other compilers and why it's just Aborted and I'm dumped.

Hope jerryscript gets better and better
Looking forward to your reply :)