Open MikeStall opened 1 year ago
Set(x, dataverseRecord) will fail since dataverseRecord is not a copyable type. (enforced with #1633) But really, we should be blocking this at time of creating variable 'x' if it's a non-copyable type.
Set(x, dataverseRecord)
Here's the check we do in Set() to block this https://github.com/microsoft/Power-Fx/blob/ee877354b4c0392d7e0d8244e6348fa5ce399d61/src/libraries/Microsoft.PowerFx.Interpreter/Functions/SetFunction.cs#L92C30-L92C54
This should be using a public property on FormulaType that hosts can check as well.
More broadly, there may be other open issues here:
Set(x, {nested: dataverseRecord})
A basic workaround is: bool IsDVType(FormulaType t) => (t as AggregateType)?.TableSymbolName != null;
bool IsDVType(FormulaType t) => (t as AggregateType)?.TableSymbolName != null;
Set(x, dataverseRecord)
will fail since dataverseRecord is not a copyable type. (enforced with #1633) But really, we should be blocking this at time of creating variable 'x' if it's a non-copyable type.Here's the check we do in Set() to block this https://github.com/microsoft/Power-Fx/blob/ee877354b4c0392d7e0d8244e6348fa5ce399d61/src/libraries/Microsoft.PowerFx.Interpreter/Functions/SetFunction.cs#L92C30-L92C54
This should be using a public property on FormulaType that hosts can check as well.
More broadly, there may be other open issues here:
Set(x, {nested: dataverseRecord})
should fail too.