KT-6244 Overloads with no default parameters should take over ones with defaults
#KT-6244 Fixed
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user