Nullability warning is missing on the lock statement #76597
Labels
Area-Compilers
Feature - Nullable Reference Types
Nullable Reference Types
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
Version Used: 17.13.0 Preview 2.1
There is no nullability warning for
lock (null) { }
orlock (maybeNullExpr) { }
, even though a null at runtime throws ArgumentNullException.Expected
A nullability warning such as:
CS8604 - Possible null reference argument for parameter.
await
orforeach
simply reflect the warning you'd get if you had manually called GetAwaiter()/GetEnumerator().CS8602 - Dereference of a possibly null reference.
expr
inlock (expr)
a "parameter" is leaking too much information about howlock
is being lowered.Or, one in the same vein as "CS8597 Thrown value may be null."
The text was updated successfully, but these errors were encountered: