Skip to content

fix(PC0013): resolve false positive for cross-table enum field access#170

Merged
Arthurvdv merged 1 commit intorelease/v0.6.1from
development
Apr 1, 2026
Merged

fix(PC0013): resolve false positive for cross-table enum field access#170
Arthurvdv merged 1 commit intorelease/v0.6.1from
development

Conversation

@Arthurvdv
Copy link
Copy Markdown
Member

Narrow IsFieldBasedOptionAccess() to only match Option fields, not Enum fields. Enum field-based member access (e.g., OtherTable.Field::Value) now falls through to AreFieldCompatible(), which correctly handles enum identity comparison via OriginalDefinition.Equals.

This fixes a regression from 8202a13 where cross-table enum field access with the same underlying enum type was incorrectly flagged.

Narrow IsFieldBasedOptionAccess() to only match Option fields, not Enum
fields. Enum field-based member access (e.g., OtherTable.Field::Value)
now falls through to AreFieldCompatible(), which correctly handles enum
identity comparison via OriginalDefinition.Equals.

This fixes a regression from 8202a13 where cross-table enum field access
with the same underlying enum type was incorrectly flagged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Arthurvdv Arthurvdv merged commit 3d856e0 into release/v0.6.1 Apr 1, 2026
40 checks passed
@Arthurvdv Arthurvdv deleted the development branch April 1, 2026 12:34
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.

False positive for PC0013: implicit Integer to Enum conversion gets flagged

1 participant