[Webkit-unassigned] [Bug 206988] New: Quantifiers after lookahead assertions should be banned in Unicode patterns only

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 30 01:27:35 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=206988

            Bug ID: 206988
           Summary: Quantifiers after lookahead assertions should be
                    banned in Unicode patterns only
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Trivial
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: shvaikalesh at gmail.com

Test case:
  /(?!.)+/u

Expected:
  SyntaxError thrown

Actual:
  RegExp instance

ECMA262:
  https://tc39.es/ecma262/#prod-annexB-Term (/u flag precludes the use of QuantifiableAssertion)

  Term[U, N] ::
    [~U] QuantifiableAssertion[?N] Quantifier

  Assertion[U, N] ::
    [~U] QuantifiableAssertion[?N]

  QuantifiableAssertion[N] ::
    (?= Disjunction[~U, ?N])
    (?! Disjunction[~U, ?N])

Test262:
  https://test262.report/browse/built-ins/RegExp/unicode_restricted_quantifiable_assertion.js
  https://test262.report/browse/language/literals/regexp/u-invalid-range-lookahead.js
  https://test262.report/browse/language/literals/regexp/u-invalid-optional-negative-lookahead.js

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200130/16436740/attachment-0001.htm>


More information about the webkit-unassigned mailing list