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
Kirill Smelkov
cython
Commits
108982d7
Commit
108982d7
authored
Feb 13, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend compile time constants error test case
parent
93c73c15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+2
-2
tests/errors/nonconst_def_tuple.pyx
tests/errors/nonconst_def_tuple.pyx
+13
-0
No files found.
Cython/Compiler/Parsing.py
View file @
108982d7
...
...
@@ -711,8 +711,8 @@ def wrap_compile_time_constant(pos, value):
else
:
# error already reported
return
None
error
(
pos
,
"Invalid type for compile-time constant: %
s
"
%
value
.
__class__
.
__name__
)
error
(
pos
,
"Invalid type for compile-time constant: %
r (type %s)
"
%
(
value
,
value
.
__class__
.
__name__
)
)
return
None
...
...
tests/errors/nonconst_def_tuple.pyx
0 → 100644
View file @
108982d7
# mode: error
DEF
t
=
(
1
,
2
,
3
)
DEF
t_const
=
(
1
,
t
,
2
)
DEF
t_non_const
=
(
1
,[
1
,
2
,
3
],
3
,
t
[
4
])
x
=
t_non_const
_ERRORS
=
u"""
5:32: Error in compile-time expression: IndexError: tuple index out of range
7:15: Invalid type for compile-time constant: None (type NoneType)
7:15: Invalid type for compile-time constant: [1, 2, 3] (type list)
"""
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