Create From Usage: Support EXPRESSION_EXPECTED_PACKAGE_FOUND diagnostic
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Create function 'foo' from usage" "true"
|
||||
|
||||
package foo
|
||||
|
||||
fun test() {
|
||||
foo(2, "2")
|
||||
}
|
||||
|
||||
fun foo(i: Int, s: String) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Create function 'foo' from usage" "true"
|
||||
|
||||
package foo
|
||||
|
||||
fun test() {
|
||||
<caret>foo(2, "2")
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Create local variable 'foo'" "true"
|
||||
// ACTION: Create parameter 'foo'
|
||||
// ERROR: Variable 'foo' must be initialized
|
||||
|
||||
package foo
|
||||
|
||||
fun test(): Int {
|
||||
val foo: Int
|
||||
|
||||
return foo
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create local variable 'foo'" "true"
|
||||
// ACTION: Create parameter 'foo'
|
||||
// ERROR: Variable 'foo' must be initialized
|
||||
|
||||
package foo
|
||||
|
||||
fun test(): Int {
|
||||
return <caret>foo
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create parameter 'foo'" "true"
|
||||
|
||||
package foo
|
||||
|
||||
fun test(n: Int,
|
||||
foo: Int) {
|
||||
val t: Int = foo
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create parameter 'foo'" "true"
|
||||
|
||||
package foo
|
||||
|
||||
fun test(n: Int) {
|
||||
val t: Int = <caret>foo
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Create property 'foo' from usage" "true"
|
||||
// ERROR: Property must be initialized
|
||||
|
||||
package foo
|
||||
|
||||
fun test(): Int {
|
||||
return foo
|
||||
}
|
||||
|
||||
val foo: Int
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create property 'foo' from usage" "true"
|
||||
// ERROR: Property must be initialized
|
||||
|
||||
package foo
|
||||
|
||||
fun test(): Int {
|
||||
return <caret>foo
|
||||
}
|
||||
Reference in New Issue
Block a user