Commit 4a870039 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add range check to DCL parsing

parent 69d39e6d
......@@ -1756,7 +1756,10 @@ def variables(root, ta_ast, context):
fix_expression_types(expr, context)
def_value = expr.right
except(AttributeError, TypeError) as err:
basic = find_basic_type(asn1_sort)
if basic.kind.startswith(('Integer', 'Real')):
check_range(basic, find_basic_type(def_value.exprType))
except(AttributeError, TypeError, Warning) as err:
#print (traceback.format_exc())
errors.append('Types are incompatible in DCL assignment: '
'left (' +
......@@ -6,7 +6,7 @@ edit:
$(OPENGEODE) --check
$(OPENGEODE) --check
test-ada: function1.ali
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment