Create From Usage: Support EXPRESSION_EXPECTED_PACKAGE_FOUND diagnostic

This commit is contained in:
Alexey Sedunov
2014-10-07 18:18:35 +04:00
parent c73c581b11
commit 2e6d4b3501
11 changed files with 104 additions and 3 deletions
@@ -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
}
@@ -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
}
@@ -0,0 +1,8 @@
// "Create parameter 'foo'" "true"
package foo
fun test(n: Int,
foo: Int) {
val t: Int = foo
}
@@ -0,0 +1,7 @@
// "Create parameter 'foo'" "true"
package foo
fun test(n: Int) {
val t: Int = <caret>foo
}
@@ -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
@@ -0,0 +1,8 @@
// "Create property 'foo' from usage" "true"
// ERROR: Property must be initialized
package foo
fun test(): Int {
return <caret>foo
}