KT-6244 Overloads with no default parameters should take over ones with defaults

#KT-6244 Fixed
This commit is contained in:
Stanislav Erokhin
2015-08-31 22:07:37 +03:00
parent 5ded315cbb
commit d015f713cb
14 changed files with 99 additions and 16 deletions
@@ -158,7 +158,7 @@ public class OverloadingConflictResolver {
if (fIsVararg && !gIsVararg) return false;
if (!fIsVararg && !gIsVararg) {
if (fSize != gSize) return false;
if (fSize > gSize) return false;
for (int i = 0; i < fSize; i++) {
ValueParameterDescriptor fParam = fParams.get(i);
@@ -24,6 +24,7 @@ public enum ResolutionStatus {
UNKNOWN_STATUS,
UNSAFE_CALL_ERROR,
OTHER_ERROR,
ARGUMENTS_MAPPING_ERROR,
// '1.foo()' shouldn't be resolved to 'fun String.foo()'
// candidates with such error are treated specially
// (are mentioned in 'unresolved' error, if there are no other options)
@@ -31,7 +32,6 @@ public enum ResolutionStatus {
// 'a.foo()' shouldn't be resolved to package level non-extension 'fun foo()'
// candidates with such error are thrown away completely
RECEIVER_PRESENCE_ERROR,
ARGUMENTS_MAPPING_ERROR,
INCOMPLETE_TYPE_INFERENCE,
SUCCESS(true);