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
3476834e
Commit
3476834e
authored
Apr 15, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print correct column in error message
parent
babc378e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-2
tests/errors/e_notnone2.pyx
tests/errors/e_notnone2.pyx
+2
-2
No files found.
Cython/Compiler/Nodes.py
View file @
3476834e
...
...
@@ -1906,9 +1906,9 @@ class DefNode(FuncDefNode):
else
:
arg
.
accept_none
=
True
# won't be used, but must be there
if
arg
.
not_none
:
error
(
self
.
pos
,
"Only Python type arguments can have 'not None'"
)
error
(
arg
.
pos
,
"Only Python type arguments can have 'not None'"
)
if
arg
.
or_none
:
error
(
self
.
pos
,
"Only Python type arguments can have 'or None'"
)
error
(
arg
.
pos
,
"Only Python type arguments can have 'or None'"
)
def
analyse_signature
(
self
,
env
):
if
self
.
entry
.
is_special
:
...
...
tests/errors/e_notnone2.pyx
View file @
3476834e
def
eggs
(
int
x
not
None
,
char
*
y
not
None
):
pass
_ERRORS
=
u"""
1:
0
: Only Python type arguments can have 'not None'
1:
0
: Only Python type arguments can have 'not None'
1:
9
: Only Python type arguments can have 'not None'
1:
25
: Only Python type arguments can have 'not None'
"""
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