Repository navigation
fix(sv)!: enforce class member access visibility - #2074
Conversation
Reject local and protected property and method access from unauthorized lexical class scopes, including static members and constructors. Preserve same-class access through another instance, inherited base methods, and protected access from derived classes (IEEE 1800-2023 8.18). Use a dedicated InaccessibleClassMember diagnostic and share the access check with randomization. Update the five affected negative sv-tests cases in both state modes; CI verifies the full release-driver corpus. Validation: analyzer unit tests (812 passed, 3 existing ignored), combined analyzer tests (814 passed, 3 ignored), focused positive/negative access regressions, Clippy and formatting. Full release sv-tests runs in CI as requested. Class backend integration is deferred to CI; the local optimized executor build was stopped before running cases. BREAKING CHANGE: AnalyzerError gains InaccessibleClassMember; exhaustive Rust matches must handle the new diagnostic. Change-Id: I8d06c5438d529abac8c32c9ce7eec9cdd36764a9
|
This pull request is part of a Mergify stack:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5836ab740
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| check_access( | ||
| tree, | ||
| dimensions, | ||
| &property.owner, |
There was a problem hiding this comment.
Preserve class scope when checking static property initializers
When a static property initializer accesses a local or protected member of its own class, this check rejects valid code. For example, class C; local static int secret = 1; static int value = C::secret; endclass now produces InaccessibleClassMember. In procedural.rs, initial_processes_from_scope collects static property initializers and binds them using module-level item_dimensions, without setting class_scope, so the new guard treats this same-class access as external. Preserve each initializer's owning class and bind it in that lexical scope before enforcing visibility.
Useful? React with 👍 / 👎.
Merge Queue Status
This pull request spent 33 minutes 39 seconds in the queue, including 32 minutes 3 seconds running CI. Required conditions to merge
|
Reject local and protected property and method access from unauthorized
lexical class scopes, including static members and constructors. Preserve
same-class access through another instance, inherited base methods, and
protected access from derived classes (IEEE 1800-2023 8.18).
Use a dedicated InaccessibleClassMember diagnostic and share the access
check with randomization. Update the five affected negative sv-tests cases
in both state modes; CI verifies the full release-driver corpus.
Validation: analyzer unit tests (812 passed, 3 existing ignored), combined
analyzer tests (814 passed, 3 ignored), focused positive/negative access
regressions, Clippy and formatting. Full release sv-tests runs in CI as
requested. Class backend integration is deferred to CI; the local optimized
executor build was stopped before running cases.
BREAKING CHANGE: AnalyzerError gains InaccessibleClassMember; exhaustive
Rust matches must handle the new diagnostic.
Depends-On: #2067