microsoft / Power-Fx

Power Fx low-code programming language
MIT License
3.21k stars 327 forks source link

When source and target are of same type, should return true for CanPotentiallyCoerceToTargetType #1570

Closed xieofxie closed 1 year ago

xieofxie commented 1 year ago

https://github.com/microsoft/Power-Fx/blob/ace1d1fa33c34eb40a96404de59b67562779250f/src/libraries/Microsoft.PowerFx.Interpreter/Marshal/TypeCoercionProvider.cs#L345

Since they are not aggregated type, we should return true to support more types like Decimal, Guid etc.

https://github.com/microsoft/Power-Fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Public/Types/FormulaType.cs

nguhoa commented 1 year ago

Fixed in https://github.com/microsoft/Power-Fx/pull/1572