Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8025134 Andre's conformance bugs with hg tip fa491b75d3e4
  3. JDK-8025486

RegExp constructor arguments are not evaluated in right order

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • core-libs
    • None

      jjs> new RegExp({toString:function(){print("str1")}},{toString:function(){print("str2")}})

      Expected: "str1" and then "str2"
      Actual: "str2" and then "str1"

      jjs> new RegExp(/asdf/, {toString:function(){throw "blubb"}})

      Expected: throw TypError instead of "blubb"
      Actual: "blubb" is thrown

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: