Repository navigation
Add dependency for generic array interface type - #127278
MichalStrehovsky wants to merge 2 commits into
Conversation
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
There was a problem hiding this comment.
Pull request overview
Adds a missing dependency edge in the AOT compiler’s EEType dependency analysis so that constructed generic interface EETypes that are specially implemented by arrays also ensure the corresponding array EEType is present.
Changes:
- When emitting a constructed EEType for a “generic array interface type” (e.g., interfaces implemented by
T[]), add a dependency on the constructed EEType forT[].
This comment has been minimized.
This comment has been minimized.
| if (factory.TypeSystemContext.IsGenericArrayInterfaceType(_type) && _type.Instantiation[0].IsEnum) | ||
| { | ||
| dependencyList.Add(factory.ConstructedTypeSymbol(_type.Instantiation[0].MakeArrayType()), "Generic interface implemented by arrays"); | ||
| } |
There was a problem hiding this comment.
This introduces a new dependency edge for generic array interfaces instantiated over enums, but there doesn't appear to be a regression test that would fail without this change (e.g., an ILCompiler.Compiler.Tests DependencyGraph test asserting that using IList roots the constructed EEType for MyEnum[] even when MyEnum[] is never otherwise referenced). Adding a targeted test would help prevent future dependency analysis regressions in this area.
🤖 Copilot Code Review — PR #127278Note This review was generated by GitHub Copilot using Claude Opus 4.6, with a GPT-5.3-codex sub-agent contributing additional analysis. A Claude Sonnet 4.6 sub-agent timed out and did not contribute. Holistic AssessmentMotivation: The change addresses a NativeAOT dependency graph gap where constructing a generic array interface type ( Approach: The fix is minimal, well-placed in Summary: Detailed Findings✅ Correctness —
|
No description provided.