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
Xavier Thompson
cython
Commits
bfb25060
Commit
bfb25060
authored
Mar 19, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct type inference for cypclass new statements
parent
0b9833fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+8
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
bfb25060
...
...
@@ -5410,7 +5410,10 @@ class CallNode(ExprNode):
func_type
=
function
.
infer_type
(
env
)
if
isinstance
(
function
,
NewExprNode
):
# note: needs call to infer_type() above
return
PyrexTypes
.
CPtrType
(
function
.
class_type
)
if
function
.
class_type
.
is_cyp_class
:
return
function
.
class_type
else
:
return
PyrexTypes
.
CPtrType
(
function
.
class_type
)
if
func_type
is
py_object_type
:
# function might have lied for safety => try to find better type
entry
=
getattr
(
function
,
'entry'
,
None
)
...
...
@@ -5858,7 +5861,10 @@ class SimpleCallNode(CallNode):
# Calc result type and code fragment
if
isinstance
(
self
.
function
,
NewExprNode
):
self
.
type
=
PyrexTypes
.
CPtrType
(
self
.
function
.
class_type
)
if
self
.
function
.
class_type
.
is_cyp_class
:
self
.
type
=
self
.
function
.
class_type
else
:
self
.
type
=
PyrexTypes
.
CPtrType
(
self
.
function
.
class_type
)
else
:
self
.
type
=
func_type
.
return_type
...
...
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