jerryscript-project / jerryscript

Ultra-lightweight JavaScript engine for the Internet of Things.
https://jerryscript.net
Apache License 2.0
6.89k stars 669 forks source link

A question about assert #5040

Open AidPaike opened 1 year ago

AidPaike commented 1 year ago

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 :)