Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
643f2bd4
Commit
643f2bd4
authored
Jul 30, 2014
by
dbarbera
Browse files
Fix type analysis for bitwise operators and Seqof/Bitstring operands
parent
9b271e09
Changes
1
Hide whitespace changes
Inline
Side-by-side
ogParser.py
View file @
643f2bd4
...
...
@@ -1056,13 +1056,16 @@ def logic_expression(root, context):
errors
.
append
(
error
(
root
,
msg
))
break
if
bty
.
kind
in
(
'BooleanType'
,
'BitStringType'
)
:
if
bty
.
kind
==
'BooleanType'
:
continue
elif
bty
.
kind
==
'SequenceOfType'
and
bty
.
type
.
kind
==
'BooleanType'
:
elif
bty
.
kind
==
'BitStringType'
and
bty
.
Min
==
bty
.
Max
:
continue
elif
bty
.
kind
==
'SequenceOfType'
and
bty
.
type
.
kind
==
'BooleanType'
\
and
bty
.
Min
==
bty
.
Max
:
continue
else
:
msg
=
'Bitwise operators only work with Booleans, '
\
'SequenceOf Booleans or BitStrings'
'
fixed size
SequenceOf Booleans or
fixed size
BitStrings'
errors
.
append
(
error
(
root
,
msg
))
break
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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