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

Add match pattern type warning #98275

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

WizardOhio24
Copy link
Contributor

Closes #42224

This provides a warning for all the cases where a match expression will not match a pattern due to a type difference. This covers all primitive types and types within arrays and dictionaries. The warning explains why the pattern will not match (eg, warning: match expression type is int but the pattern type is float).

@Calinou
Copy link
Member

Calinou commented Oct 18, 2024

I suggest adding GDScript integration tests so you can check the warning is emitted when it should be (and not emitted when it shouldn't).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Match don't match
3 participants