Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect code completion with the same member names as semi-type prefixes #6909 #6915

Merged

Conversation

junichi11
Copy link
Member

Example:

class Example {
    public function Type(): int {
        return 0;
    }

    public function test(): void {
        $this->Type()-> // before: Example members(`Type()`, `test()`) are shown
                        // after : no items
    }
}

… prefixes apache#6909

- apache#6909
- To avoid conflicting with member names, add `-type` suffix to semi-type prefixes because "-" can not be contained to member names
- Add unit tests

Example:
```php
class Example {
    public function Type(): int {
        return 0;
    }

    public function test(): void {
        $this->Type()-> // before: Example members(`Type()`, `test()`) are shown
                        // after : no items
    }
}
```
@junichi11 junichi11 added the PHP [ci] enable extra PHP tests (php/php.editor) label Jan 4, 2024
@junichi11 junichi11 added this to the NB21 milestone Jan 4, 2024
@junichi11 junichi11 requested a review from tmysik January 4, 2024 12:08
@junichi11 junichi11 linked an issue Jan 4, 2024 that may be closed by this pull request
Copy link
Member

@tmysik tmysik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, thanks.

@junichi11
Copy link
Member Author

Thank you, Tomas! Merging.

@junichi11 junichi11 merged commit 1b73a19 into apache:master Jan 4, 2024
34 checks passed
@junichi11 junichi11 deleted the php-gh-6909-incorrect-cc-with-type-method branch January 4, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code completion error when function name is Type()
2 participants