[FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
^KT-46860
This commit is contained in:
committed by
teamcityserver
parent
937f4c1dab
commit
f26059a7d3
@@ -62,7 +62,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?")!><!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?"), DEBUG_INFO_SMARTCAST!>x<!>.prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!><!DEBUG_INFO_EXPRESSION_TYPE("Class?")!><!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?"), DEBUG_INFO_SMARTCAST!>x<!>.prop_8<!><!UNSAFE_CALL!>.<!>prop_8<!>
|
||||
@@ -77,7 +77,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?")!><!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?"), DEBUG_INFO_SMARTCAST!>x<!>.prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!><!DEBUG_INFO_EXPRESSION_TYPE("Class"), DEBUG_INFO_SMARTCAST!><!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?"), DEBUG_INFO_SMARTCAST!>x<!>.prop_8<!>.prop_8<!>
|
||||
@@ -92,7 +92,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?")!><!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?"), DEBUG_INFO_SMARTCAST!>x<!>.prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!><!DEBUG_INFO_EXPRESSION_TYPE("Class"), DEBUG_INFO_SMARTCAST!><!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?"), DEBUG_INFO_SMARTCAST!>x<!>.prop_8<!>.prop_8<!>
|
||||
|
||||
Reference in New Issue
Block a user