Skip to content

[JS] Constant highlighting with inner function declaration and default arguments #8299

@NReib

Description

@NReib

Apache NetBeans version

Apache NetBeans 25

What happened

See reproduction steps - it will work if instead of const, let is used, also the function parameter needs a default value and another function must be declared inside of the given function.

Language / Project Type / NetBeans Component

No response

How to reproduce

'use strict';

function testX(a = true){
		const x = 1; // caret on x here does not highlight usage of x in next line
		x; // caret on x here highlights both x
		function(){
		}
	}

Did this work correctly in an earlier version?

No / Don't know

Operating System

x

JDK

x

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaScript[ci] enable web job and extra JavaScript tests (webcommon/javascript2.editor)kind:bugBug report or fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions