You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CMTK0003 misses Wait() on a ?:, ?? or switch of Result tasks #160
Found by the variant sweep of CMTK0003 before 2.3.0 (Variants/DroppedTaskShapes, the use "waited for with Wait()").
Problem
Wait() on a ?:, ?? or switch expression of tasks of results compiles with no CMTK0003, while the same expression dropped, awaited or converted to a plain Task reports each branch's call:
(dry?orders.CancelAsync(id):orders.ShipAsync(id)).WaitAsync(t).Wait();// no diagnostic(held??orders.CancelAsync(id)).WaitAsync(t).Wait();// no diagnosticawait(dry?orders.CancelAsync(id):orders.ShipAsync(id)).WaitAsync(t);// CMTK0003 at each call
Cause
AnalyzeWait takes the one call PassedOn finds under the Wait, and a branch is no call, so it reports nothing. The other paths go through Producers, which enumerates the branches.
Release
2.2.0 code can contain the form. It ships in 2.3.0 under decision 0119 (a gap found before the tag ships in that release), in the PR for #152, #157 and #159.
Fixed in #164 (into release/2.3.0), held by DroppedTaskVariantTests over Variants/DroppedTaskShapes and seeded. The Analyzers README and the changelog say what 2.3.0 reports; 2.2-writable forms ship under decision 0119.
Activity
fix: CMTK0003 reports assertions and results lost through Task's comb…
CaffeinatedCoder commentedon Oct 29, 2026
Fixed in #164 (into
release/2.3.0), held byDroppedTaskVariantTestsoverVariants/DroppedTaskShapesand seeded. The Analyzers README and the changelog say what 2.3.0 reports; 2.2-writable forms ship under decision 0119.CaffeinatedCoder commentedon Oct 29, 2026
Fixed in #164, merged into
release/2.3.0(9878a6c).