archives

« Bugzilla Issues Index

#4358 — inconsistency in RegEx Term::Assertion evaluation algorithm


In 21.2.2.5 Term section:

Evaluation algorithm for production "Term :: Assertion" assumes that Assertion always evaluates to AssertionTester.
However, "Assertion :: ( ? = Disjunction )" and "Assertion :: ( ? ! Disjunction )" evaluate to a matcher.
Therefore, this section should start with something like "if Assertion evaluates to a Matcher closure, return that Matcher closure"


This appears to be a bug that has existed since ES5 yet this is the first time it has been reported.

Because of the nature of this bug, I think it is best to not try to rush a fix into ES6 at this late stage. Instead, I'm going to transfer it to ES7 so it can be addressed in the first yearly update to ES6.