Skip to content

Commit

Permalink
Adding code from #2246 since this PR depends on it.
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-joyle committed Mar 7, 2024
1 parent 53a5b07 commit 3249eb4
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2873,12 +2873,20 @@ public override void Visit(FirstNameNode node)
isConstantNamedFormula = formula.IsConstant;
}
}
else if (lookupInfo.Kind == BindKind.Data)
{
if (lookupInfo.Data is IExternalCdsDataSource or IExternalTabularDataSource)
{
_txb.SetMutable(node, true);
}
else if (lookupInfo.Kind == BindKind.Data)
{
if (lookupInfo.Data is IExternalCdsDataSource or IExternalTabularDataSource)
{
_txb.SetMutable(node, true);
}
else if (lookupInfo.Data is IExternalDataSource ds)
{
_txb.SetMutable(node, ds.IsWritable);
}
}
else if (lookupInfo.Kind == BindKind.ScopeCollection)
{
_txb.SetMutable(node, true);
}

Contracts.Assert(lookupInfo.Kind != BindKind.LambdaField);
Expand Down

0 comments on commit 3249eb4

Please sign in to comment.