Commit 97478b74 authored by Robert Bradshaw's avatar Robert Bradshaw

Raise error for no suitable constructor.

parent f449a377
...@@ -2275,8 +2275,11 @@ def best_match(args, functions, pos=None): ...@@ -2275,8 +2275,11 @@ def best_match(args, functions, pos=None):
if len(candidates) == 1: if len(candidates) == 1:
return candidates[0][0] return candidates[0][0]
elif len(candidates) == 0: elif len(candidates) == 0:
if len(errors) == 1 and pos is not None: if pos is not None:
error(pos, errors[0][1]) if len(errors) == 1:
error(pos, errors[0][1])
else:
error(pos, "no suitable method found")
return None return None
possibilities = [] possibilities = []
......
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