Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
061dbfe3
Commit
061dbfe3
authored
Oct 16, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More type inference fixes.
parent
f0859e96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+5
-5
tests/run/type_inference.pyx
tests/run/type_inference.pyx
+4
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
061dbfe3
...
...
@@ -3253,6 +3253,11 @@ class CallNode(ExprNode):
return
result_type
return
py_object_type
def
type_dependencies
(
self
,
env
):
# TODO: Update when Danilo's C++ code merged in to handle the
# the case of function overloading.
return
self
.
function
.
type_dependencies
(
env
)
def
may_be_none
(
self
):
if
self
.
may_return_none
is
not
None
:
return
self
.
may_return_none
...
...
@@ -3325,11 +3330,6 @@ class SimpleCallNode(CallNode):
except
Exception
,
e
:
self
.
compile_time_value_error
(
e
)
def
type_dependencies
(
self
,
env
):
# TODO: Update when Danilo's C++ code merged in to handle the
# the case of function overloading.
return
self
.
function
.
type_dependencies
(
env
)
def
analyse_as_type
(
self
,
env
):
attr
=
self
.
function
.
as_cython_attribute
()
if
attr
==
'pointer'
:
...
...
tests/run/type_inference.pyx
View file @
061dbfe3
...
...
@@ -593,6 +593,10 @@ def with_statement_untyped():
print
(
typeof
(
x
))
return
x
def
self_lookup
(
a
):
b
=
a
b
=
b
.
foo
(
keyword
=
None
)
print
typeof
(
b
)
# Regression test for trac #638.
...
...
Write
Preview
Markdown
is supported
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