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
1790573a
Commit
1790573a
authored
Oct 15, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
in ResultRefNode: avoid re-inferring the expression type if the expression knows its type already
parent
52c8f6b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Cython/Compiler/UtilNodes.py
Cython/Compiler/UtilNodes.py
+4
-2
No files found.
Cython/Compiler/UtilNodes.py
View file @
1790573a
...
@@ -143,10 +143,12 @@ class ResultRefNode(AtomicExprNode):
...
@@ -143,10 +143,12 @@ class ResultRefNode(AtomicExprNode):
self
.
type
=
self
.
expression
.
type
self
.
type
=
self
.
expression
.
type
def
infer_type
(
self
,
env
):
def
infer_type
(
self
,
env
):
if
self
.
expression
is
not
None
:
return
self
.
expression
.
infer_type
(
env
)
if
self
.
type
is
not
None
:
if
self
.
type
is
not
None
:
return
self
.
type
return
self
.
type
if
self
.
expression
is
not
None
:
if
self
.
expression
.
type
is
not
None
:
return
self
.
expression
.
type
return
self
.
expression
.
infer_type
(
env
)
assert
False
,
"cannot infer type of ResultRefNode"
assert
False
,
"cannot infer type of ResultRefNode"
def
may_be_none
(
self
):
def
may_be_none
(
self
):
...
...
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