More accurate safe call handling in GenericCandidateResolver / CallExpressionResolver
(real receiver nullability is taken into account)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
17593e4ef6
commit
0f7284f83a
@@ -26,6 +26,10 @@ fun foo(l: A<String>?) {
|
||||
// No errors should be here
|
||||
foo(l?.bar()) checkType { _<String?>() }
|
||||
foo(l?.gav()) checkType { _<String?>() }
|
||||
if (l != null) {
|
||||
foo(l<!UNNECESSARY_SAFE_CALL!>?.<!>bar()) checkType { _<String>() }
|
||||
foo(l<!UNNECESSARY_SAFE_CALL!>?.<!>gav()) checkType { _<String>() }
|
||||
}
|
||||
}
|
||||
|
||||
fun fooNotNull(l: A<String>) {
|
||||
|
||||
Reference in New Issue
Block a user