Closed RenanCarlosPereira closed 4 months ago
@StefH could you review it, then if possible we could update the rules engine 😅
@RenanCarlosPereira Can you merge the latest master into your branch? I want to check if the GitHub action also gets triggered for this PR.
@StefH could you review it, then if possible we could update the rules engine 😅
- I will.
- Which project is that ?
the bug related is in the rules engine, I actually need to open a bug over there and reference it here: because the bug itself its not in the rules engine, but this PR will solve the issue and we will have to upgrade the package: https://github.com/microsoft/RulesEngine/issues/604#issuecomment-2185151056 https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/821
I am unsure why GitHub actions are not triggering, merge is done!
Description: There is an issue in the
ExpressionPromoter
class where the qualifier in the numeric literal expressions is not correctly handled, leading to incorrect type promotions. This is due to the way qualifiers are stored and retrieved from theConstantExpressionHelper
.Steps to Reproduce:
ParsingConfig
.NumberParser
to parse a numeric literal with a qualifier.ExpressionPromoter
.Example 1:
Example 2:
Expected Behavior: The
Promote
method should correctly handle the qualifier and convert the numeric literal to the specified target type.Actual Behavior: The promotion fails, and the conversion does not occur as expected due to the incorrect handling of the qualifier in the
ConstantExpressionHelper
.Additional Information: This issue affects applications that rely on dynamic LINQ queries where numeric-type promotions with qualifiers are necessary.
Proposed Solution: Ensure that the
CreateLiteral
inConstantExpressionHelper
correctly handles qualifiers without the prefix when creating and retrieving constant expressions.