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
df6b0e74
Commit
df6b0e74
authored
May 20, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some more unreachable code tests
parent
7e1483e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
tests/errors/w_unreachable_cf.pyx
tests/errors/w_unreachable_cf.pyx
+45
-0
No files found.
tests/errors/w_unreachable_cf.pyx
0 → 100644
View file @
df6b0e74
# mode: error
# tag: werror, unreachable, control-flow
def
try_finally
():
try
:
return
finally
:
return
print
'oops'
def
try_return
():
try
:
return
except
:
return
print
'oops'
def
for_return
(
a
):
for
i
in
a
:
return
else
:
return
print
'oops'
def
while_return
(
a
):
while
a
:
return
else
:
return
print
'oops'
def
forfrom_return
(
a
):
for
i
from
0
<=
i
<=
a
:
return
else
:
return
print
'oops'
_ERRORS
=
"""
9:4: Unreachable code
16:4: Unreachable code
23:4: Unreachable code
30:4: Unreachable code
37:4: Unreachable code
"""
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