DirectiveBasedActionUtils: don't allow to specify ACTION directives that won't be checked anyway

This commit is contained in:
Valentin Kipyatkov
2015-06-15 20:19:38 +03:00
parent c0062b1199
commit eadeb6e63f
11 changed files with 7 additions and 28 deletions
@@ -1,9 +1,7 @@
// "class com.intellij.codeInsight.daemon.impl.quickfix.ImportClassFixBase" "false"
// ERROR: Unresolved reference: SomeTest
// ACTION: Create class 'SomeTest'
// ACTION: Edit intention settings
// ACTION: Replace safe access expression with 'if' expression
// ACTION: Disable 'Replace Safe Access Expression with 'if' Expression'
package testing
@@ -1,7 +1,5 @@
// "Create property 'foo'" "false"
// ACTION: Convert to expression body
// ACTION: Disable 'Convert to Expression Body'
// ACTION: Edit intention settings
// ACTION: Create parameter 'foo'
// ACTION: Create local variable 'foo'
// ERROR: Unresolved reference: foo
@@ -1,7 +1,5 @@
// "Create property 'foo'" "false"
// ACTION: Convert to expression body
// ACTION: Disable 'Convert to Expression Body'
// ACTION: Edit intention settings
// ACTION: Create extension property 'foo'
// ERROR: Unresolved reference: foo
@@ -1,7 +1,5 @@
// "Change 'A.x' type to '(Int) -> Int'" "false"
// ACTION: Change 'C.x' type to '(String) -> Int'
// ACTION: Disable inspection
// ACTION: Edit inspection profile setting
// ERROR: <html>Return type is '(kotlin.Int) &rarr; kotlin.Int', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>val</b> x: (kotlin.String) &rarr; kotlin.Int <i>defined in</i> A</html>
interface A {
val x: (String) -> Int
@@ -3,12 +3,6 @@
// ACTION: Add function body
// ACTION: Make 'foo' abstract
// ACTION: Convert member to extension
// ACTION: Disable 'Convert to extension'
// ACTION: Disable inspection
// ACTION: Disable inspection
// ACTION: Edit inspection profile setting
// ACTION: Edit inspection profile setting
// ACTION: Edit intention settings
package a
@@ -1,7 +1,5 @@
// "Change 'B.x' type to '(String) -> [ERROR : Ay]'" "false"
// ACTION: Change 'A.x' type to '(Int) -> Int'
// ACTION: Disable inspection
// ACTION: Edit inspection profile setting
// ERROR: <html>Return type is '(kotlin.Int) &rarr; kotlin.Int', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>val</b> x: (kotlin.String) &rarr; [ERROR : Ay] <i>defined in</i> A</html>
// ERROR: Unresolved reference: Ay
interface A {
@@ -1,7 +1,5 @@
// "Change parameter 'z' type of function 'foo' to '(Int) -> String'" "false"
// ACTION: Edit intention settings
fun foo(y: Int = 0, z: (Int) -> String = {""}) {
foo {
""<caret> as Int
@@ -1,6 +1,4 @@
// "Change 'foo' function return type to '([ERROR : NoSuchType]) -> Int'" "false"
// ACTION: Disable 'Make Types Implicit In Lambda (May Break Code)'
// ACTION: Edit intention settings
// ACTION: Create annotation 'NoSuchType'
// ACTION: Create class 'NoSuchType'
// ACTION: Create enum 'NoSuchType'
@@ -1,8 +1,6 @@
// "Change 'AA.f' function return type to 'Boolean'" "false"
// ACTION: Change 'AAA.g' function return type to 'Int'
// ACTION: Convert to expression body
// ACTION: Disable 'Convert to Expression Body'
// ACTION: Edit intention settings
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Boolean</td></tr><tr><td>Found:</td><td>kotlin.Int</td></tr></table></html>
interface A {
fun f(): Int
@@ -1,10 +1,6 @@
// "Change 'AA.contains' function return type to 'Int'" "false"
// ACTION: Change 'AAA.g' function return type to 'Boolean'
// ACTION: Convert to expression body
// ACTION: Disable 'Convert to Expression Body'
// ACTION: Disable 'Replace Overloaded Operator With Function Call'
// ACTION: Edit intention settings
// ACTION: Edit intention settings
// ACTION: Replace overloaded operator with function call
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>kotlin.Int</td></tr><tr><td>Found:</td><td>kotlin.Boolean</td></tr></table></html>
interface A {