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.

Bug 238942

Summary: Incorrect Error Reporting for Javascript 1.7 keywords
Product: javascript Reporter: aladio
Component: EditorAssignee: Petr Hejl <phejl>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dusty, geverl
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 8 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: Incorrect Keyword Errors

Description aladio 2013-11-28 16:20:12 UTC
Created attachment 142694 [details]
Incorrect Keyword Errors

Keywords let and const and maybe more keywords are reported as errors.
Reproducible on NetBeans 7.4, Window 7 x64 as well.
Comment 1 Petr Pisl 2013-12-04 13:43:18 UTC
I know about this. This is problem with Nashorn, that parse the js file and reports these errors. IMHO we can only now suppress these errors in NetBeans(don't show them), but the problem is that the file will not be parsed anyway. 

I will try to contact people from Nashorn and talk with them about this.
Comment 2 Roman Svitanic 2015-06-22 13:49:21 UTC
*** Bug 226477 has been marked as a duplicate of this bug. ***
Comment 3 JoelMac 2015-09-30 15:35:58 UTC
Also needed is the ability to recognize other syntax additions like the fat arrow functions (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions).  I'm sure there's others as well. 

I'm making Chrome packaged apps.  It's a good environment to play with advanced javaScript features, because I don't need to worry about other browsers, but I can't do it in netbeans, because the files won't parse; I've got errors everywhere and some other features won't work without a cleanly parsed file.

I'm not sure if simply ignoring these errors in netbeans would work.  It needs to be aware of these JS features so that other netbeans features will work.  If I define a variable with const, the parser needs to know that I've defined a variable so that it can do the proper highlighting when it's selected.  It should also warn me if I try to assign a new value to it.

Is there a way to get a hold of the Nashorn people?  Had a hard time finding a way to contact them.  Is that project still active?
Comment 4 Petr Hejl 2016-07-18 11:25:33 UTC
This ia already working in the dev build.

*** This bug has been marked as a duplicate of bug 242387 ***