Skip to content

Commit

Permalink
Use result_type from any ExpressionBase instance
Browse files Browse the repository at this point in the history
Fixes #72
  • Loading branch information
zeroSteiner committed Aug 3, 2023
1 parent de63bfe commit cca88d6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rule_engine/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,9 +1081,7 @@ def _validate_function(self, function_type, arguments):
function_name=function_type.value_name
)
for pos, (arg1, arg2_type) in enumerate(zip(arguments, function_type.argument_types), 1):
if isinstance(arg1, LiteralExpressionBase):
arg1_type = arg1.result_type
elif isinstance(arg1, SymbolExpression):
if isinstance(arg1, ExpressionBase):
arg1_type = arg1.result_type
else:
arg1_type = DataType.from_value(arg1)
Expand Down

0 comments on commit cca88d6

Please sign in to comment.