K2: Avoid losing diagnostics for synthetic calls

Some of the changed tests may duplicate other existing diagnostics,
but that should not be reason not to report them at all.

There might be another job to be done to avoid diagnostic duplications
This commit is contained in:
Denis.Zharkov
2022-11-23 13:19:43 +01:00
committed by Space Team
parent fe5adab652
commit d7399ed1cf
31 changed files with 97 additions and 74 deletions
@@ -136,7 +136,7 @@ fun poll16(flag: Boolean): Flow<String> {
fun poll17(flag: Boolean): Flow<String> {
return flow {
val inv = if (flag) { foo7() } else { ::Foo7 }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (flag) { foo7() } else { ::Foo7 }<!>
inv
}
}
@@ -185,7 +185,7 @@ fun poll25(flag: Boolean): Flow<String> {
fun poll26(flag: Boolean): Flow<String> {
return flow {
val inv = when (flag) { true -> ::Foo7 false -> foo7() else -> ::Foo7 }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>when (flag) { true -> ::Foo7 false -> foo7() else -> ::Foo7 }<!>
inv
}
}
@@ -234,7 +234,7 @@ fun poll35(flag: Boolean): Flow<String> {
fun poll36(flag: Boolean): Flow<String> {
return flow {
val inv = when (flag) { true -> ::Foo7 false -> foo7() }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>when (flag) { true -> ::Foo7 false -> foo7() }<!>
inv
}
}
@@ -332,7 +332,7 @@ fun poll55(): Flow<String> {
fun poll56(): Flow<String> {
return flow {
val inv = try { ::Foo7 } catch (e: Exception) { foo7() } finally { foo7() }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>try { ::Foo7 } catch (e: Exception) { foo7() } finally { foo7() }<!>
inv
}
}
@@ -430,7 +430,7 @@ fun poll75(): Flow<String> {
fun poll76(): Flow<String> {
return flow {
val inv = ::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!><!>
inv
}
}
@@ -85,7 +85,7 @@ fun poll16(flag: Boolean): Flow<String> {
fun poll17(flag: Boolean): Flow<String> {
return flow {
val inv = if (flag) { foo7() } else { ::Foo7 }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (flag) { foo7() } else { ::Foo7 }<!>
inv
}
}
@@ -183,7 +183,7 @@ fun poll55(): Flow<String> {
fun poll56(): Flow<String> {
return flow {
val inv = try { ::Foo7 } catch (e: Exception) { foo7() } finally { foo7() }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>try { ::Foo7 } catch (e: Exception) { foo7() } finally { foo7() }<!>
inv
}
}
@@ -79,7 +79,7 @@ fun poll75(): Flow<String> {
fun poll76(): Flow<String> {
return flow {
val inv = ::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!><!>
inv
}
}
@@ -80,7 +80,7 @@ fun poll75(): Flow<String> {
fun poll76(): Flow<String> {
return flow {
val inv = ::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!><!>
inv
}
}
@@ -138,7 +138,7 @@ fun poll16(flag: Boolean): Flow<String> {
fun poll17(flag: Boolean): Flow<String> {
return flow {
val inv = if (flag) { foo7() } else { ::Foo7 }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (flag) { foo7() } else { ::Foo7 }<!>
inv
}
}
@@ -187,7 +187,7 @@ fun poll25(flag: Boolean): Flow<String> {
fun poll26(flag: Boolean): Flow<String> {
return flow {
val inv = when (flag) { true -> ::Foo7 false -> foo7() else -> ::Foo7 }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>when (flag) { true -> ::Foo7 false -> foo7() else -> ::Foo7 }<!>
inv
}
}
@@ -236,7 +236,7 @@ fun poll35(flag: Boolean): Flow<String> {
fun poll36(flag: Boolean): Flow<String> {
return flow {
val inv = when (flag) { true -> ::Foo7 false -> foo7() }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>when (flag) { true -> ::Foo7 false -> foo7() }<!>
inv
}
}
@@ -334,7 +334,7 @@ fun poll55(): Flow<String> {
fun poll56(): Flow<String> {
return flow {
val inv = try { ::Foo7 } catch (e: Exception) { foo7() } finally { foo7() }
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>try { ::Foo7 } catch (e: Exception) { foo7() } finally { foo7() }<!>
inv
}
}
@@ -432,7 +432,7 @@ fun poll75(): Flow<String> {
fun poll76(): Flow<String> {
return flow {
val inv = ::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!>
val inv = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>::Foo7<!NOT_NULL_ASSERTION_ON_CALLABLE_REFERENCE!>!!<!><!>
inv
}
}