Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-joyle committed Mar 7, 2024
1 parent 74e2b41 commit dc26bef
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2873,9 +2873,20 @@ public override void Visit(FirstNameNode node)
isConstantNamedFormula = formula.IsConstant;
}
}
else if (lookupInfo.Data is IExternalDataSource ds)
else if (lookupInfo.Kind == BindKind.Data)
{
_txb.SetMutable(node, ds.IsWritable);
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 dc26bef

Please sign in to comment.