Skip to content

Code completion for use function is incorrect #7041

@junichi11

Description

@junichi11

Apache NetBeans version

Apache NetBeans 20

What happened

() is added when we run CC in the use function context.
i.e.

use function Vendor\Package\myFunction()

Language / Project Type / NetBeans Component

PHP editor

How to reproduce

Example:

<?php
namespace ExampleA;

function myFunction(): void {
}

namespace ExampleB;

use function ExampleA\myFunction^; // CC here

Actual result:

<?php
namespace ExampleA;

function myFunction(): void {
}

namespace ExampleB;

use function ExampleA\myFunction(); // "()" is added

Expected result:

<?php
namespace ExampleA;

function myFunction(): void {
}

namespace ExampleB;

use function ExampleA\myFunction; // "()" is not added

Did this work correctly in an earlier version?

No / Don't know

Operating System

Ubuntu 22.04

JDK

JDK 19

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

Yes

Metadata

Metadata

Assignees

Labels

PHP[ci] enable extra PHP tests (php/php.editor)kind:bugBug report or fix

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions