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
When trying to build MessagePack within Unity, I noticed that the latest release (2.5.140) did not enable nullable reference type via the csc.rsp file. So I manually added them to get rid of the noisy warnings only to get a warning:
ThreadsafeTypeKeyHashTable.cs(214,9): warning CS8824: Parameter 'location' must have a non-null value when exiting because parameter 'value' is non-null.
The problem: private static void VolatileWrite([NotNullIfNotNull("value")] ref Entry? location, Entry value) Entry value is not nullable.
The fix is: private static void VolatileWrite([NotNullIfNotNull("value")] ref Entry? location, Entry? value)
Flag it nullable: Entry? value.
P.S. Perhaps for future release, it would also be good to include the csc.rcp file alongside all asmdef files to enable nullable reference type.
The text was updated successfully, but these errors were encountered:
Thanks for the report. I suppose this will be solved in our upcoming major release because #1734 will avoid unity having to compile messagepack source code any more.
When trying to build MessagePack within Unity, I noticed that the latest release (2.5.140) did not enable nullable reference type via the
csc.rsp
file. So I manually added them to get rid of the noisy warnings only to get a warning:The problem:
private static void VolatileWrite([NotNullIfNotNull("value")] ref Entry? location, Entry value)
Entry value
is not nullable.The fix is:
private static void VolatileWrite([NotNullIfNotNull("value")] ref Entry? location, Entry? value)
Flag it nullable:
Entry? value
.The text was updated successfully, but these errors were encountered: