Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5921

JavaScript editor claims parseFloat undefined if extra method appended

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 12.4
    • None
    • javascript - Editor
    • None

    Description

      The following javascript code in netbeans 12.5 generates underlining for all the "parseFloat" strings, claiming parseFloat (a standard JavaScript method) is not declared.

      "use strict";
      let a = parseInt(123);
      let f = parseFloat("123.456")
      let f1 = parseFloat("123.456").toFixed()
      alert(`a=${a}, f=${f}`)

      if the ".toFixed()" is removed, parseFloat is recognised.

      It doesn't have to be "toFixed"... for instance .indexOf(".") also exhibits this behaviour

      Strictly, only lines 4 and 5 are fundamental to this report.

      Attachments

        1. image-2021-08-14-06-51-24-430.png
          24 kB
          Jonathan Mills

        Activity

          People

            Unassigned Unassigned
            monathan Jonathan Mills
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: