logilab-astng #9515 strange message for non-class "Class baz has no egg member" [resolved]

$ cat foo.py
def foo(self, bar):
    def baz():
        pass
    def qux():
        return baz
    spam = bar(None, qux)
    spam.egg()
$ pylint foo.py

************* Module foo
C:  1: Black listed name "foo"
C:  1: Missing docstring
C:  1:foo: Black listed name "foo"
C:  1:foo: Missing docstring
C:  1:foo: Black listed name "bar"
C:  1:foo: Black listed name "bar"
C:  2:foo.baz: Black listed name "baz"
C:  2:foo.baz: Missing docstring
C:  4:foo.qux: Missing docstring
E:  7:foo: Class 'baz' has no 'egg' member
W:  1:foo: Unused argument 'self'

Sorry, but this is wrong. baz is a function, not a class. Furthermore I fail to see the connection between spam and baz. Could you explain and/or fix this?

Helmut

priorityimportant
typebug
done in0.19.2
load0.500
load left0.000
closed by<not specified>