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
4686d44d
Commit
4686d44d
authored
9 years ago
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test of unsigned long vs. int64_t.
parent
ffb5aa5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
tests/run/type_inference.pyx
tests/run/type_inference.pyx
+5
-0
No files found.
tests/run/type_inference.pyx
View file @
4686d44d
...
...
@@ -697,8 +697,13 @@ def int64_long_sum():
cdef
long
x
=
1
cdef
int32_t
x32
=
2
cdef
int64_t
x64
=
3
cdef
unsigned
long
ux
=
4
assert
typeof
(
x
+
x32
)
==
typeof
(
x32
+
x
)
==
'long'
,
typeof
(
x
+
x32
)
assert
typeof
(
x
+
x64
)
==
typeof
(
x64
+
x
)
==
'int64_t'
,
typeof
(
x
+
x64
)
# The correct answer here is either unsigned long or int64_t, depending on
# whether sizeof(long) == 64 or not. Incorrect signedness is probably
# preferable to incorrect width.
assert
typeof
(
ux
+
x64
)
==
typeof
(
x64
+
ux
)
==
'int64_t'
,
typeof
(
ux
+
x64
)
cdef
class
InferInProperties
:
"""
...
...
This diff is collapsed.
Click to expand it.
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