Skip to content

Inconsistent error messages for overloaded functions #27

@JukkaL

Description

@JukkaL

Type checking this code

def f(): pass
def g(): pass
def g(a): pass
f.x
g.x

produces these errors

t.py, line 4: function has no member "x"
t.py, line 5: object has no member "x"

Note that the error messages are different, even though both refer to functions (the first message refers to an ordinary function, the second to an overloaded function).

It would be better if the error message were consistent.

Metadata

Metadata

Assignees

Labels

bugmypy got something wrong

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions