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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
cython
Commits
e09e0c6a
Commit
e09e0c6a
authored
5 years ago
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct type inference for CallNode
parent
ee42a193
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+12
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
e09e0c6a
...
...
@@ -5416,9 +5416,18 @@ class CallNode(ExprNode):
func_type
=
entry
.
type
or
func_type
if
func_type
.
is_ptr
:
func_type
=
func_type
.
base_type
if
func_type
.
is_cfunction
:
if
getattr
(
self
.
function
,
'entry'
,
None
)
and
hasattr
(
self
,
'args'
):
alternatives
=
self
.
function
.
entry
.
all_alternatives
()
if
func_type
.
is_cfunction
or
func_type
.
is_cyp_class
:
alternatives
=
None
cypclass_wrapper_entry
=
None
if
func_type
.
is_cyp_class
:
cypclass_wrapper_entry
=
func_type
.
scope
.
lookup_here
(
"<constructor>"
)
func_type
=
cypclass_wrapper_entry
.
type
if
hasattr
(
self
,
'args'
):
if
cypclass_wrapper_entry
:
alternatives
=
cypclass_wrapper_entry
.
all_alternatives
()
elif
getattr
(
self
.
function
,
'entry'
,
None
):
alternatives
=
self
.
function
.
entry
.
all_alternatives
()
if
alternatives
:
arg_types
=
[
arg
.
infer_type
(
env
)
for
arg
in
self
.
args
]
func_entry
=
PyrexTypes
.
best_match
(
arg_types
,
alternatives
)
if
func_entry
:
...
...
This diff is collapsed.
Click to expand it.
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