RegExp constructor arguments are not evaluated in right order

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: