#
fff5771c |
| 03-Mar-2020 |
Nikita Popov |
Require non-absolute trait method refs to be unambiguous Currently, when writing something like class X { use T1, T2 { func as otherFunc; } functi
Require non-absolute trait method refs to be unambiguous Currently, when writing something like class X { use T1, T2 { func as otherFunc; } function func() {} } where both T1::func() and T2::func() exist, we will simply assume that func refers to T1::func(). This is surprising, and it doesn't really make sense that this particular method gets picked. This commit validates that non-absolute method references are unambiguous, i.e. refer to exactly one method. If there is ambiguity, it is required to write T1::func as otherFunc or similar. Closes GH-5232.
show more ...
|