Skip to content

fix: Refine iterator and async method body scanning#469

Open
Optano-Dev wants to merge 1 commit into
TNG:mainfrom
Optano-Dev:280-sequence-contains-no-matching-element-when-building-the-architecture
Open

fix: Refine iterator and async method body scanning#469
Optano-Dev wants to merge 1 commit into
TNG:mainfrom
Optano-Dev:280-sequence-contains-no-matching-element-when-building-the-architecture

Conversation

@Optano-Dev

Copy link
Copy Markdown

Instead of resolving the first newobj instruction, search all newobj instructions for the first type that actually declares a MoveNext method. This prevents picking up an unrelated compiler-generated object.

Fixes #280

@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.95%. Comparing base (312f823) to head (1cfa42f).

Files with missing lines Patch % Lines
ArchUnitNET/Loader/TypeProcessor.cs 70.00% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #469      +/-   ##
==========================================
- Coverage   79.97%   79.95%   -0.03%     
==========================================
  Files         259      259              
  Lines       13326    13339      +13     
  Branches     1240     1242       +2     
==========================================
+ Hits        10658    10665       +7     
- Misses       2291     2294       +3     
- Partials      377      380       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Optano-Dev Optano-Dev force-pushed the 280-sequence-contains-no-matching-element-when-building-the-architecture branch from afce442 to 5d7d52a Compare July 13, 2026 06:36
Instead of resolving the first newobj instruction, search all newobj
instructions for the first type that actually declares a MoveNext method.
This prevents picking up an unrelated compiler-generated object.

Fixes TNG#280

Signed-off-by: Optano-Dev <69143350+Optano-Dev@users.noreply.github.com>
@Optano-Dev Optano-Dev force-pushed the 280-sequence-contains-no-matching-element-when-building-the-architecture branch from 5d7d52a to 1cfa42f Compare July 13, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Sequence contains no matching element" when building the Architecture

2 participants