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

Complete inside match expression #2051

Merged
merged 1 commit into from
Jan 21, 2023

Conversation

przepompownia
Copy link
Contributor

No description provided.

@przepompownia przepompownia changed the title Complete inside match expression Complete inside match expression Jan 20, 2023
@przepompownia
Copy link
Contributor Author

I wanted to add also

        yield 'expression inside match arm' => [
            '<?php class Foobar { public function x() { match (true) { 1 => $th<> }; }}', [
                [
                    'type'              => Suggestion::TYPE_VARIABLE,
                    'name'              => '$this',
                    'short_description' => '$this',
                ]
            ],
        ];

but have no idea what to yield in createTolerantCompletor instead of NameSearchResult (which cannot be created with variable type).

@dantleech dantleech merged commit e728e00 into phpactor:master Jan 21, 2023
@dantleech
Copy link
Collaborator

cool, thanks

@przepompownia przepompownia deleted the complete-in-match-case branch January 21, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants