Skip to content

ilverify: allow ldsflda of initonly static fields outside the cctor - #135994

Merged
jkotas merged 3 commits into
dotnet:mainfrom
lagudafuadtosin:fix-94090
Oct 18, 2026
Merged

jkotas merged 3 commits into
dotnet:mainfrom
lagudafuadtosin:fix-94090

Conversation

@lagudafuadtosin

Copy link
Copy Markdown
Contributor

fixes #94090

drops the InitOnly check on ldsflda, same as ldflda (#57444), as suggested on #112081. stores are still checked.

tested: new FieldTests case fails on main, passes with the fix.

Matches how ldflda of initonly instance fields is handled until readonly references are verified (dotnet#57444). Stores to initonly static fields outside the cctor are still reported.
@github-actions github-actions Bot added the area-Tools-ILVerification Issues related to ilverify tool and IL verification in general label Oct 17, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Oct 17, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib
See info in area-owners.md if you want to be subscribed.

@jkotas

jkotas commented Oct 17, 2026

Copy link
Copy Markdown
Member

Going through the abandoned PR #112081: Could you please address this comment #112081 (comment) ? (add a new section at the end of Ecma-335-Augments.md)

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@jkotas
jkotas enabled auto-merge (squash) October 17, 2026 21:46
@jkotas

jkotas commented Oct 18, 2026

Copy link
Copy Markdown
Member

/ba-g failures fixed in main

@jkotas
jkotas merged commit b22bfee into dotnet:main Oct 18, 2026
122 of 124 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 19, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Tools-ILVerification Issues related to ilverify tool and IL verification in general community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ILVerify incorrectly complains about use of initonly field outside of constructor+

2 participants