summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorda-woods <dw-git@d-woods.co.uk>2020-04-18 17:00:04 +0100
committerda-woods <dw-git@d-woods.co.uk>2020-04-18 17:00:04 +0100
commit6e904633f13faa7dc36015a900bd8ab06abc6b8f (patch)
tree15a9d6567ef632a5e08abf35ff321fb88cbd6197
parentf22704c1abc718a12e28a7eae49dda82ab945a2d (diff)
downloadcython-6e904633f13faa7dc36015a900bd8ab06abc6b8f.tar.gz
Fixed cpp_operators (handle type is None)
-rw-r--r--Cython/Compiler/ExprNodes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
index ad6d6b6c2..2e0e5dc6a 100644
--- a/Cython/Compiler/ExprNodes.py
+++ b/Cython/Compiler/ExprNodes.py
@@ -657,14 +657,14 @@ class ExprNode(Node):
def analyse_as_specialized_type(self, env):
type = self.analyse_as_type(env)
- if type.is_fused and env.fused_to_specific:
+ if type and type.is_fused and env.fused_to_specific:
# while it would be nice to test "if entry.type in env.fused_to_specific"
# rather than try/catch this doesn't work reliably (mainly for nested fused types)
try:
return type.specialize(env.fused_to_specific)
except KeyError:
pass
- if type.is_fused:
+ if type and type.is_fused:
error(self.pos, "Type is not specific")
return type