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
1cfad096
Commit
1cfad096
authored
Jun 07, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Large integer literal type inference test.
parent
1847ab3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests/run/type_inference.pyx
tests/run/type_inference.pyx
+15
-0
No files found.
tests/run/type_inference.pyx
View file @
1cfad096
...
...
@@ -417,3 +417,18 @@ def common_extension_type_base():
w
=
A
()
w
=
CC
()
assert
typeof
(
w
)
==
"Python object"
,
typeof
(
w
)
@
infer_types
(
None
)
def
large_literals
():
"""
>>> large_literals()
"""
# It's only safe to infer small integer literals.
a
=
10
b
=
100000000000000000000000000000000
assert
typeof
(
a
)
==
"long"
,
typeof
(
a
)
assert
typeof
(
b
)
==
"Python object"
,
typeof
(
b
)
c
,
d
=
10
,
100000000000000000000000000000000
assert
typeof
(
c
)
==
"long"
,
typeof
(
c
)
assert
typeof
(
d
)
==
"Python object"
,
typeof
(
d
)
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