NI: introduce warning about implicitly inferred Nothing with existing non-Nothing expected type

^KT-35406 Fixed
This commit is contained in:
Victor Petukhov
2020-02-13 16:09:50 +03:00
parent e3184e407d
commit 51edf2b351
18 changed files with 414 additions and 42 deletions
@@ -3831,12 +3831,12 @@ fun Nothing.case_63() {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing"), DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>this<!>.hashCode()
hashCode()
<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>apply<!> {
<!IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION!>apply<!> {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing"), DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>this<!>
<!UNREACHABLE_CODE!>hashCode()<!>
<!UNREACHABLE_CODE!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing"), DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>this<!>.hashCode()<!>
}
<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>also<!> {
<!IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION!>also<!> {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>it<!>
<!UNREACHABLE_CODE!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>it<!>.hashCode()<!>
}