projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b41438
)
Fix error_on_uninitialized condition
author
Vitja Makarov
<vitja.makarov@gmail.com>
Sun, 2 Jun 2013 09:07:28 +0000
(13:07 +0400)
committer
Vitja Makarov
<vitja.makarov@gmail.com>
Sun, 2 Jun 2013 09:07:28 +0000
(13:07 +0400)
Cython/Compiler/FlowControl.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/FlowControl.py
b/Cython/Compiler/FlowControl.py
index
efb25b6
..
7b2e39a
100644
(file)
--- a/
Cython/Compiler/FlowControl.py
+++ b/
Cython/Compiler/FlowControl.py
@@
-575,9
+575,9
@@
def check_definitions(flow, compiler_directives):
if node.allow_null or entry.from_closure or entry.is_pyclass_attr:
pass # Can be uninitialized here
elif node.cf_is_null:
- if
Options.error_on_uninitialized and
(
- entry.type.is_pyobject or entry.type.is_unspecified or
- entry.
error_on_uninitialized
):
+ if
entry.error_on_uninitialized or
(
+ Options.error_on_uninitialized and (
+ entry.
type.is_pyobject or entry.type.is_unspecified)
):
messages.error(
node.pos,
"local variable '%s' referenced before assignment"