Open
Description
Method resolution has two steps. We collect a list of types, then we go through that list and, for each type, look to see whether there's one or more matching methods. If we find multiple matching trait methods, that's an error. But otherwise, we stop if we find one.
What we don't do is continue down the list of types after finding a matching method. In PR #1394 this was brought up. We weren't happy with the fix, but this is something we should think about when reworking this language.
See also:
- Document method-call expressions in pseudo-code as well as prose #1432
- Method Call Resolution #1018
- Small mistake in method call expressions explanation? #718
cc @ehuss
Metadata
Metadata
Assignees
Labels
No labels