Improve RegExp.prototype.compile (#2971)

This patch fixes the return value of the routine also fixes several incorrect regression-tests
due to the previously incorrect [[RegExpMatcher]] internal slot check.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-07-17 08:14:38 +02:00
committed by GitHub
parent 2700e66c4b
commit a21a4191ca
6 changed files with 35 additions and 11 deletions
+6 -1
View File
@@ -12,4 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
RegExp.prototype.compile(RegExp.prototype);
try {
RegExp.prototype.compile(RegExp.prototype);
assert(false);
} catch (e) {
assert (e instanceof TypeError);
}