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
Gwenaël Samain
cython
Commits
0a0e72a7
Commit
0a0e72a7
authored
Feb 19, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler crash on calling non-entry function.
parent
a46f5295
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+8
-1
tests/errors/e_callnonfunction.pyx
tests/errors/e_callnonfunction.pyx
+6
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
0a0e72a7
...
@@ -2601,6 +2601,13 @@ class SimpleCallNode(CallNode):
...
@@ -2601,6 +2601,13 @@ class SimpleCallNode(CallNode):
self
.
function
.
entry
=
entry
self
.
function
.
entry
=
entry
self
.
function
.
type
=
entry
.
type
self
.
function
.
type
=
entry
.
type
func_type
=
self
.
function_type
()
func_type
=
self
.
function_type
()
else
:
func_type
=
self
.
function_type
()
if
not
func_type
.
is_cfunction
:
error
(
self
.
pos
,
"Calling non-function type '%s'"
%
func_type
)
self
.
type
=
PyrexTypes
.
error_type
self
.
result_code
=
"<error>"
return
# Check no. of args
# Check no. of args
max_nargs
=
len
(
func_type
.
args
)
max_nargs
=
len
(
func_type
.
args
)
expected_nargs
=
max_nargs
-
func_type
.
optional_arg_count
expected_nargs
=
max_nargs
-
func_type
.
optional_arg_count
...
...
tests/errors/e_callnonfunction.pyx
View file @
0a0e72a7
...
@@ -8,7 +8,13 @@ ctypedef struct s: # FIXME: this might be worth an error ...
...
@@ -8,7 +8,13 @@ ctypedef struct s: # FIXME: this might be worth an error ...
int
x
int
x
s
()
s
()
cdef
int
x
():
return
0
x
()()
_ERRORS
=
u"""
_ERRORS
=
u"""
2:1: Calling non-function type 'int'
2:1: Calling non-function type 'int'
5:1: Calling non-function type 'float'
5:1: Calling non-function type 'float'
14:3: Calling non-function type 'int'
"""
"""
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