[FE] Add clear warning about future changes about nullability of safe call with non nullable receiver

^KT-46860
This commit is contained in:
Dmitriy Novozhilov
2021-10-26 17:35:31 +03:00
committed by teamcityserver
parent 937f4c1dab
commit f26059a7d3
122 changed files with 323 additions and 283 deletions
@@ -53,7 +53,7 @@ fun case_3(x: Class?) {
* ISSUES: KT-30376
*/
fun case_4(x: Class?) {
if (x!!<!UNNECESSARY_SAFE_CALL!>?.<!>prop_8?.prop_8?.prop_8?.prop_8 == null == true) else {
if (<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x!!<!UNNECESSARY_SAFE_CALL!>?.<!>prop_8<!>?.prop_8?.prop_8?.prop_8 == null == true) else {
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>.prop_8
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>.prop_8<!UNSAFE_CALL!>.<!>prop_8
@@ -68,7 +68,7 @@ fun case_4(x: Class?) {
* ISSUES: KT-30376
*/
fun case_5(x: Class?) {
if (x?.prop_8!!<!UNNECESSARY_SAFE_CALL!>?.<!>prop_8?.prop_8?.prop_8 == null == true) else {
if (<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x?.prop_8!!<!UNNECESSARY_SAFE_CALL!>?.<!>prop_8<!>?.prop_8?.prop_8 == null == true) else {
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>.prop_8
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>.prop_8.prop_8
@@ -83,7 +83,7 @@ fun case_5(x: Class?) {
* ISSUES: KT-30376
*/
fun case_6(x: Class?) {
if (x?.prop_8?.prop_8?.prop_8!!<!UNNECESSARY_SAFE_CALL!>?.<!>prop_8 == null == true) else {
if (<!SAFE_CALL_WILL_CHANGE_NULLABILITY!>x?.prop_8?.prop_8?.prop_8!!<!UNNECESSARY_SAFE_CALL!>?.<!>prop_8<!> == null == true) else {
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>.prop_8
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>.prop_8.prop_8