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 270158

Summary: Editor does not highlight and refactor variables defined with "const" and "var"
Product: javascript Reporter: dusty <dusty>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: Dev   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description dusty 2017-03-21 16:34:17 UTC
If I have a code like:

let x = 2
console.log('x: '+x)

and I put the cursor under the "x", netbeans correctly automatically highlights all the x instances, ans hence the x on both lines. I can also refactor the name correctly.

If instead I define it as "const" or "var", for example:

const x = 2
console.log('x: '+x)

netbeans does not highlight them, even if it should.

Also, I suppose for the same problem, I'm unable to correctly refactor its name: all the usages are not renamed correctly
Comment 1 dusty 2017-03-21 16:34:51 UTC
I verified the problem both in NB 8.2 and netbeans-dev-201703210002