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
43a3dbea
Commit
43a3dbea
authored
Jan 07, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indexing type inference.
parent
342eb45a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
tests/run/type_inference.pyx
tests/run/type_inference.pyx
+7
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
43a3dbea
...
@@ -2033,7 +2033,7 @@ class IndexNode(ExprNode):
...
@@ -2033,7 +2033,7 @@ class IndexNode(ExprNode):
return
None
return
None
def
type_dependencies
(
self
,
env
):
def
type_dependencies
(
self
,
env
):
return
self
.
base
.
type_dependencies
(
env
)
return
self
.
base
.
type_dependencies
(
env
)
+
self
.
index
.
type_dependencies
(
env
)
def
infer_type
(
self
,
env
):
def
infer_type
(
self
,
env
):
base_type
=
self
.
base
.
infer_type
(
env
)
base_type
=
self
.
base
.
infer_type
(
env
)
...
...
tests/run/type_inference.pyx
View file @
43a3dbea
...
@@ -479,3 +479,10 @@ def large_literals():
...
@@ -479,3 +479,10 @@ def large_literals():
c
,
d
=
10
,
100000000000000000000000000000000
c
,
d
=
10
,
100000000000000000000000000000000
assert
typeof
(
c
)
==
"long"
,
typeof
(
c
)
assert
typeof
(
c
)
==
"long"
,
typeof
(
c
)
assert
typeof
(
d
)
==
"Python object"
,
typeof
(
d
)
assert
typeof
(
d
)
==
"Python object"
,
typeof
(
d
)
# Regression test for trac #638.
def
bar
(
foo
):
qux
=
foo
quux
=
foo
[
qux
.
baz
]
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