Skip to content

Commit

Permalink
Fix compatibility with net9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jandupej committed Oct 1, 2024
1 parent ae061fd commit 5a55c8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cs/src/core/expressions/DeserializerTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ Expression Container(IParser parser, Expression container, Type schemaType, bool
else
{
var capacity = container.Type.GetDeclaredProperty("Capacity", count.Type);
if (capacity != null)
if (capacity != null && capacity.CanWrite)
{
var cappedCount = Expression.Variable(typeof(int), container + "_count");
beforeLoop = ApplyCountCap(
Expand Down

0 comments on commit 5a55c8f

Please sign in to comment.