Skip to content

Conversation

zielinsky
Copy link
Member

@zielinsky zielinsky commented Aug 24, 2025

We want to allow decomposition only on the right-hand side of a pattern if the type is not a type parameter, a type parameter reference, or a deferred type reference. This is because decomposition on the right-hand side of a pattern can lead to false positive warnings.

Fixes #20395
Fixes #20225

@zielinsky zielinsky changed the title Fix unreachable case warning (E121) Fix unreachable case warning Aug 24, 2025
@zielinsky zielinsky changed the title Fix unreachable case warning Fix false unreachable case warning Aug 24, 2025
@zielinsky zielinsky marked this pull request as ready for review August 26, 2025 10:14
@Gedochao Gedochao requested a review from hamzaremmal August 26, 2025 10:14
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.

Wrong unreachable code reported for inline def pattern match Unreachable case warning (E121) in inline generic function
3 participants