Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
12.4
-
None
-
None
-
Product Version: Apache NetBeans IDE 12.4Java: 15.0.2; Java HotSpot(TM) 64-Bit Server VM 15.0.2+7-27
Runtime: Java(TM) SE Runtime Environment 15.0.2+7-27
System: Windows 10 version 10.0 running on amd64; Cp1252; en_GB (nb)
User directory: C:\Users\xyzzy\AppData\Roaming\NetBeans\12.4Cache directory: C:\Users\xyzzy\AppData\Local\NetBeans\Cache\12.4
Windows 10 21H1 (Build 19043.1110)
Product Version: Apache NetBeans IDE 12.4 Java: 15.0.2; Java HotSpot(TM) 64-Bit Server VM 15.0.2+7-27 Runtime: Java(TM) SE Runtime Environment 15.0.2+7-27 System: Windows 10 version 10.0 running on amd64; Cp1252; en_GB (nb) User directory: C:\Users\xyzzy\AppData\Roaming\NetBeans\12.4 Cache directory: C:\Users\xyzzy\AppData\Local\NetBeans\Cache\12.4 Windows 10 21H1 (Build 19043.1110)
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.