Introduce Parameter: Do not apply to expressions of type Unit or Nothing
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
fun foo(): Int {
|
||||
var x = 1
|
||||
<selection>x = x + 1</selection>
|
||||
|
||||
return 1 + x
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Cannot introduce parameter of type 'Unit'
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo(): Int {
|
||||
<selection>fun bar() = 1</selection>
|
||||
|
||||
return 1 + bar()
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Cannot introduce parameter of type 'Unit'
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo(): Int {
|
||||
<selection>val x = 1</selection>
|
||||
|
||||
return 1 + x
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Cannot introduce parameter of type 'Unit'
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(): Int {
|
||||
<selection>return 1</selection>
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Cannot introduce parameter of type 'Nothing'
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(): Int {
|
||||
<selection>throw Exception()</selection>
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Cannot introduce parameter of type 'Nothing'
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo(): Int {
|
||||
<selection>while (false) {}</selection>
|
||||
|
||||
return 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Cannot introduce parameter of type 'Unit'
|
||||
Reference in New Issue
Block a user