This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
build 200704170100 Expected duplicate variables and functions to generate error squiggles. Steps: 1. create web > visual web project 2. create javascript page 3. paste this code in 2x var c=0 var t function timedCount() { document.getElementById('txt').value=c c=c+1 t=setTimeout("timedCount()",1000) } 4. Editor shows no errors, navigator shows both variables and functions.
Having more declarations of the same variable in the same context is legal in JavaScript. But you are right, we can add some warning there.
I don't think we should show an error for this. But in 6.1, global variables are shown with a different color so when you open this code fragment in 6.1 you see instantly that your c and t references inside the timedCount function are indeed referencing the global variables.
I think that this works as expected from NB 7.3.