Commit 83ecf76f authored by Stefan Behnel's avatar Stefan Behnel

cleanup: do not raise unnecessary compiler errors for code that may not even get executed

parent c35d101f
...@@ -1262,9 +1262,6 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform): ...@@ -1262,9 +1262,6 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
is_temp = node.is_temp, is_temp = node.is_temp,
utility_code = include_string_h_utility_code) utility_code = include_string_h_utility_code)
elif arg.type.is_pyobject: elif arg.type.is_pyobject:
if isinstance(arg, ExprNodes.NoneNode):
error(node.pos, "object of type 'NoneType' has no len()")
return node
cfunc_name = self._map_to_capi_len_function(arg.type) cfunc_name = self._map_to_capi_len_function(arg.type)
if cfunc_name is None: if cfunc_name is None:
return node return node
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment