Commit 355765b3 authored by Stefan Behnel's avatar Stefan Behnel

better error message

parent 6f11bc12
...@@ -1456,7 +1456,8 @@ class CClassScope(ClassScope): ...@@ -1456,7 +1456,8 @@ class CClassScope(ClassScope):
if not args: if not args:
error(pos, "C method has no self argument") error(pos, "C method has no self argument")
elif not args[0].type.same_as(self.parent_type): 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) entry = self.lookup_here(name)
if entry: if entry:
if not entry.is_cfunction: if not entry.is_cfunction:
......
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