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
34642eea
Commit
34642eea
authored
Dec 23, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pointer test to cross-closure type inference tests
parent
b08fc9c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
tests/run/cross_closure_type_inference.pyx
tests/run/cross_closure_type_inference.pyx
+17
-0
No files found.
tests/run/cross_closure_type_inference.pyx
View file @
34642eea
...
@@ -72,6 +72,23 @@ def test_outer_inner_incompatible():
...
@@ -72,6 +72,23 @@ def test_outer_inner_incompatible():
return
cython
.
typeof
(
x
)
return
cython
.
typeof
(
x
)
def
test_outer_inner_ptr
():
"""
>>> print(test_outer_inner_ptr())
double *
"""
x
=
1.0
xptr_outer
=
&
x
def
inner
():
nonlocal
x
x
=
1
xptr_inner
=
&
x
assert
cython
.
typeof
(
xptr_inner
)
==
cython
.
typeof
(
xptr_outer
),
(
'%s != %s'
%
(
cython
.
typeof
(
xptr_inner
),
cython
.
typeof
(
xptr_outer
)))
inner
()
return
cython
.
typeof
(
xptr_outer
)
def
test_outer_inner2_double
():
def
test_outer_inner2_double
():
"""
"""
>>> print(test_outer_inner2_double())
>>> print(test_outer_inner2_double())
...
...
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