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.
Sample code: if (t1==undefined) { alert("t1 is undefined"); } if (t2===undefined) { alert("t2 is undefined"); } undefined keyword is considered as variable and not recognized by editor (it is not blue but black) Product Version: NetBeans IDE Dev (Build web-main-9571-on-20121219) Java: 1.7.0_10; Java HotSpot(TM) Client VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18 System: Linux version 3.2.0-34-generic-pae running on i386; UTF-8; en_US (nb)
Undefined is not a keyword, its a property of global object and primitive value so it shouldn't be blue. https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined
Interesting, I'm sorry I didn't know about it. I thought it is since many editors usually highlight it as a keyword.
So shouldn't the "undefined" be purple as for instance Infinity or NaN?
Reopening because I think undefined should be purple as NaN etc. but not black as any local variable (I don't want to report new issue since this was about distinguishing undefined-although incorrectly assumed to be keyword, in code).
Fixed in web-main.
Integrated into 'main-silver', will be available in build *201505260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/9762dcb8225a User: Petr Pisl <ppisl@netbeans.org> Log: #224075 - Undefined property is not purple in editor