jerryscript icon indicating copy to clipboard operation
jerryscript copied to clipboard

A question about assert

Open AidPaike opened this issue 2 years ago • 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 :)

AidPaike avatar Feb 01 '23 17:02 AidPaike