Repository navigation
Preserve unsealed System.Enum in managed ilasm core libraries - #136884
Merged
jkoritzinsky merged 3 commits intoNov 3, 2026
Merged
jkoritzinsky merged 3 commits into
jkoritzinsky merged 3 commits into
Conversation
Match native ilasm's core-library exception to value-type sealing, recognizing .mscorlib and assembly mscorlib. Cover System.Enum, lookalikes, and ordinary enum/value-type behavior. Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 5 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
jkotas
reviewed
Nov 2, 2026
Reuse the core-library name helper for assembly definitions and match assembly lookup's case-insensitive comparison. Expand regression coverage and remove implementation details from the README. Co-authored-by: Copilot App <[email protected]>
Remove implicit sealing while retaining the unsealed value-type diagnostic. Update diagnostic text and cover strict rejection, tolerant emission, explicit sealing, and legacy raw flags. Co-authored-by: Copilot App <[email protected]>
jkotas
approved these changes
Nov 3, 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.
Managed ilasm rejects the abstract
System.Enumdefinition in source-built reference assemblies with ILA0002 and implicitly seals it. This breaks the offline source build of the .NET 7, 9, and 10 reference packs in build 1660358.Match native ilasm's exception:
System.Enumis a reference type despite extendingSystem.ValueType, so its top-level core-library definition must not trigger value-type sealing. Recognize.mscorliband.assembly mscorlibfor this check, while preserving diagnostics for ordinary value types and lookalikes. Ordinary user-defined enum sealed flags are unchanged.Validation
.\build.cmd tools.ilasm- passed before the product change..\dotnet.cmd test src\tools\ilasm\tests\ILAssembler.Tests\ILAssembler.Tests.csproj --no-build --no-restore --filter FullyQualifiedName~TypeDefinitionTests- before the fix, the four new System.Enum regression cases failed with ILA0002; the other 67 cases passed..\dotnet.cmd build src\tools\ilasm\src\ILAssembler\gen -t:Rebuild --no-restore- passed; regenerated the parser..\build.cmd tools.ilasm -test- passed after the fix: 5,746 passed, 0 failed, 3 existing skips.System.Enumremains abstract and unsealed.Note
This pull request description and code changes were generated with GitHub Copilot.