From 355765b3b7f88467dc6647b0f474a6ba772e50f0 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 11 Mar 2009 10:26:38 +0100 Subject: [PATCH] better error message --- Cython/Compiler/Symtab.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 14a205b9..ef56b4ed 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -1456,7 +1456,8 @@ class CClassScope(ClassScope): if not args: error(pos, "C method has no self argument") elif not args[0].type.same_as(self.parent_type): - error(pos, "Self argument of C method does not match parent type") + error(pos, "Self argument (%s) of C method '%s' does not match parent type (%s)" % + (args[0].type, name, self.parent_type)) entry = self.lookup_here(name) if entry: if not entry.is_cfunction: -- 2.26.2