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
It seems that across application rebuilds, the cache that is being done inside the ExplicitMode.memberNullabilityCache dictionary is not properly handled. Basically, if for example move the [NotNull] attribute from a parameter to another, it won't be seen so the generated code is wrong. All the issue stems from the fact that we have that case static, and apparently it's kept in memory across rebuilds.
The steps to reproduce are:
Open the sample
Compile and check the diassembly
Move the NotNull attribute to another parameter, keeping the other things intact
Verify the disassembly again and see that while the NotNull attribute placement has moved, the null-guard wasn't updated.
Hello,
It seems that across application rebuilds, the cache that is being done inside the
ExplicitMode.memberNullabilityCache
dictionary is not properly handled. Basically, if for example move the[NotNull]
attribute from a parameter to another, it won't be seen so the generated code is wrong. All the issue stems from the fact that we have that casestatic
, and apparently it's kept in memory across rebuilds.The steps to reproduce are:
NotNull
attribute to another parameter, keeping the other things intactNotNull
attribute placement has moved, the null-guard wasn't updated.Initial version:
After moving the
NotNull
:Here's the sample:
DryIocPoc.zip
A potential fix (probably best fix) would be to get rid of the static usage and use instances instead.
The text was updated successfully, but these errors were encountered: