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
1ea0816e
Commit
1ea0816e
authored
9 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 'indexing' for template types
parent
c98b56bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
1ea0816e
...
@@ -3256,6 +3256,7 @@ class IndexNode(_IndexingBaseNode):
...
@@ -3256,6 +3256,7 @@ class IndexNode(_IndexingBaseNode):
self
.
parse_indexed_fused_cdef
(
env
)
self
.
parse_indexed_fused_cdef
(
env
)
else
:
else
:
self
.
type_indices
=
self
.
parse_index_as_types
(
env
)
self
.
type_indices
=
self
.
parse_index_as_types
(
env
)
self
.
index
=
None
# FIXME: use a dedicated Node class instead of generic IndexNode
if
base_type
.
templates
is
None
:
if
base_type
.
templates
is
None
:
error
(
self
.
pos
,
"Can only parameterize template functions."
)
error
(
self
.
pos
,
"Can only parameterize template functions."
)
self
.
type
=
error_type
self
.
type
=
error_type
...
@@ -3265,6 +3266,7 @@ class IndexNode(_IndexingBaseNode):
...
@@ -3265,6 +3266,7 @@ class IndexNode(_IndexingBaseNode):
self
.
type
=
error_type
self
.
type
=
error_type
else
:
else
:
self
.
type
=
base_type
.
specialize
(
dict
(
zip
(
base_type
.
templates
,
self
.
type_indices
)))
self
.
type
=
base_type
.
specialize
(
dict
(
zip
(
base_type
.
templates
,
self
.
type_indices
)))
# FIXME: use a dedicated Node class instead of generic IndexNode
return
self
return
self
def
analyse_as_c_tuple
(
self
,
env
,
getting
,
setting
):
def
analyse_as_c_tuple
(
self
,
env
,
getting
,
setting
):
...
...
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