Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Dec 23, 2025
TomerStarkware
approved these changes
Dec 23, 2025
Collaborator
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @orizi).
Princetimix69
pushed a commit
to Princetimix69/cairo
that referenced
this pull request
Jan 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Refactored error code handling in semantic diagnostics by moving the error code logic from
SemanticDiagnosticKind::error_code()directly intoSemanticDiagnostic::error_code(). This eliminates the separate implementation on the kind enum while maintaining the same functionality.Why is this change needed?
This refactoring simplifies the code structure by removing an unnecessary method implementation on
SemanticDiagnosticKindand placing the error code logic directly where it's used inSemanticDiagnostic. This makes the code more maintainable by keeping related functionality together and reduces indirection.What was the behavior or documentation before?
Previously,
SemanticDiagnostic::error_code()delegated toSemanticDiagnosticKind::error_code(), creating an unnecessary layer of indirection.What is the behavior or documentation after?
Now,
SemanticDiagnostic::error_code()directly implements the error code mapping logic, eliminating the separate implementation on the kind enum while maintaining identical functionality.