microsoft / microsoft/CsWinRT

Bug: Investigate ToImmutableList with IDIC

Open
#1,996 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
665
Forks
134
Avg merge
1d 3h
Merged PRs (30d)
32

Description

Description

ToImmutableList seems to be triggering IDIC for ICollection. This needs to be investigated if expected and possibly update the analyzer to catch this. This is also seen with IInspectable which should be investigated.

Steps To Reproduce
  1. Have a function return IVectorView
  2. Call ToImmutableList
  3. Exception when AOT is enabled
Expected Behavior

TBD

Version Info

CsWinRT 2.3

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported reproduction: a function returning IVectorView, followed by ToImmutableList with AOT enabled. Compare the ICollection and IInspectable cases, determine the expected behavior, and then assess whether the analyzer should flag the pattern; the issue does not name any files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.