Skip to content

Commit e03370c

Browse files
author
Julien Couvreur
committed
Extensions: adjust nullability analysis of setters
1 parent f009f3e commit e03370c

File tree

6 files changed

+2019
-347
lines changed

6 files changed

+2019
-347
lines changed

src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.DebugVerifier.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,13 @@ private void VisitForEachEnumeratorInfo(ForEachEnumeratorInfo enumeratorInfo)
292292
VerifyExpression(leftConversion);
293293
}
294294

295+
if (node.Left is BoundPropertyAccess { PropertySymbol.SetMethod: { } propSet } propertyAccess
296+
&& propSet.IsExtensionBlockMember()
297+
&& node.FinalPlaceholder is not null)
298+
{
299+
Visit(node.FinalPlaceholder);
300+
}
301+
295302
Visit(node.Left);
296303
Visit(node.Right);
297304
return null;

0 commit comments

Comments
 (0)