blob: cbc6689e1fe3544abd25f7021befa74e56a80a25 [file] [log] [blame]
description("Regression test for 150663");
// We should be able to tail call a native function from a JS callee of C++
"use strict";
class Test {
constructor(a, b)
{
this.a = a;
this.b = b;
}
get sum()
{
return Number(this.a + this.b);
}
}
var testObj = new Test(40, 2);
for (var i = 0; i < 100000; i++) {
var result = testObj.sum;
if (result != 42)
testFailed("Expected 42 from \"sum\" getter, got " + result);
}
testPassed("Able to tail call a native function from a JS callee of C++ code");