Improve diagnostic on overload resolution ambiguity
Report type mismatch on argument when a nullable argument is passed to non-null parameter. Note that this affects only functions with simple types without generics #KT-2007 Fixed #KT-9282 Fixed
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ fun bar(arg: Long?): Long {
|
||||
return i<!UNSAFE_CALL!>--<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> i
|
||||
}
|
||||
if (i++ == 7L) {
|
||||
return i++ <!NONE_APPLICABLE!>+<!> i
|
||||
return i++ <!UNSAFE_OPERATOR_CALL!>+<!> <!TYPE_MISMATCH!>i<!>
|
||||
}
|
||||
return 0L
|
||||
}
|
||||
Reference in New Issue
Block a user