Skip to content

Commit

Permalink
Mark ScopeCollection as mutable (#2244)
Browse files Browse the repository at this point in the history
PA is presenting a bug when mutating a collection with PFxV1 active.
  • Loading branch information
anderson-joyle authored Mar 7, 2024
1 parent c333d18 commit a11f57f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2880,6 +2880,10 @@ public override void Visit(FirstNameNode node)
_txb.SetMutable(node, true);
}
}
else if (lookupInfo.Kind == BindKind.ScopeCollection)
{
_txb.SetMutable(node, true);
}

Contracts.Assert(lookupInfo.Kind != BindKind.LambdaField);
Contracts.Assert(lookupInfo.Kind != BindKind.LambdaFullRecord);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.PowerFx.Core.Entities;
using Microsoft.PowerFx.Core.Entities.Delegation;
using Microsoft.PowerFx.Core.Functions.Delegation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using Microsoft.PowerFx.Core.Binding.BindInfo;
using Microsoft.PowerFx.Core.Entities;
using Microsoft.PowerFx.Core.Entities.Delegation;
Expand Down

0 comments on commit a11f57f

Please sign in to comment.