Fix a bunch of IDE quick-fix tests (related to "convert to run/...")
These actions became available more often some days ago
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// ACTION: Introduce local variable
|
||||
// ACTION: Add non-null asserted (!!) call
|
||||
// ACTION: Replace with safe (?.) call
|
||||
// ACTION: Convert to run
|
||||
// ACTION: Convert to with
|
||||
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
|
||||
|
||||
fun foo(arg: Int?) {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// ACTION: Convert to block body
|
||||
// ACTION: Introduce local variable
|
||||
// ACTION: Replace with safe (?.) call
|
||||
// ACTION: Convert to run
|
||||
// ACTION: Convert to with
|
||||
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
|
||||
|
||||
fun foo(arg: Int?) = arg<caret>.hashCode()
|
||||
@@ -1,6 +1,8 @@
|
||||
// "Surround with null check" "false"
|
||||
// ACTION: Add non-null asserted (!!) call
|
||||
// ACTION: Replace with safe (?.) call
|
||||
// ACTION: Convert to run
|
||||
// ACTION: Convert to with
|
||||
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
|
||||
|
||||
fun foo(s: String?) {
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
// ACTION: Convert to block body
|
||||
// ACTION: Introduce local variable
|
||||
// ACTION: Replace with safe (?.) call
|
||||
// ACTION: Convert to run
|
||||
// ACTION: Convert to with
|
||||
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
|
||||
|
||||
class My(val x: String?) {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// ACTION: Introduce local variable
|
||||
// ACTION: Add non-null asserted (!!) call
|
||||
// ACTION: Replace with safe (?.) call
|
||||
// ACTION: Convert to run
|
||||
// ACTION: Convert to with
|
||||
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
|
||||
|
||||
class My(var x: Int?) {
|
||||
|
||||
Reference in New Issue
Block a user