From 293a9b51c1dddb1cc03595ad2b26627522dda7f7 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 29 Oct 2012 16:29:22 +0100 Subject: [PATCH] fix compiler crash in optimiser dispatch code --- Cython/Compiler/Visitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/Visitor.py b/Cython/Compiler/Visitor.py index 4643362..c9d8bae 100644 --- a/Cython/Compiler/Visitor.py +++ b/Cython/Compiler/Visitor.py @@ -442,8 +442,8 @@ class MethodDispatcherTransform(EnvTransform): obj_type = self_arg.type is_unbound_method = False if obj_type.is_builtin_type: - if obj_type is Builtin.type_type and arg_list and\ - arg_list[0].type.is_pyobject: + if (obj_type is Builtin.type_type and self_arg.is_name and + arg_list and arg_list[0].type.is_pyobject): # calling an unbound method like 'list.append(L,x)' # (ignoring 'type.mro()' here ...) type_name = function.obj.name -- 2.7.4