Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
0c503cdc
Commit
0c503cdc
authored
Feb 08, 2018
by
Maxime Perrotin
Browse files
Cast Length operator properly with comparison
parent
6e976299
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
0c503cdc
...
...
@@ -1829,9 +1829,9 @@ def _equality(expr):
if
basic
:
# Cast in case a side is using a 32bits ints (eg when using Length(..))
if
lbty
.
kind
==
'IntegerType'
and
rbty
.
kind
!=
lbty
.
kind
:
right_str
=
u
'
Asn1Int
({})'
.
format
(
right_str
)
right_str
=
u
'
{}
({})'
.
format
(
type_name
(
lbty
),
right_str
)
elif
rbty
.
kind
==
'IntegerType'
and
lbty
.
kind
!=
rbty
.
kind
:
left_str
=
u
'
Asn1Int
({})'
.
format
(
left_str
)
left_str
=
u
'
{}
({})'
.
format
(
type_name
(
rbty
),
left_str
)
ada_string
=
u
'({left} {op} {right})'
.
format
(
left
=
left_str
,
op
=
expr
.
operand
,
right
=
right_str
)
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment