Fix invalid testdata for ConvertToScopeIntention applicability
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
// "Change type arguments to <*>" "false"
|
// "Change type arguments to <*>" "false"
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
fun test(a: Any) {
|
fun test(a: Any) {
|
||||||
(a as List<Boolean><caret>).bar()
|
(a as List<Boolean><caret>).bar()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
// "Change type arguments to <*, *>" "false"
|
// "Change type arguments to <*, *>" "false"
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
fun test(a: Any) {
|
fun test(a: Any) {
|
||||||
(a as Map<Int, Boolean><caret>).bar()
|
(a as Map<Int, Boolean><caret>).bar()
|
||||||
}
|
}
|
||||||
|
|||||||
-2
@@ -3,8 +3,6 @@
|
|||||||
// ACTION: Convert property initializer to getter
|
// ACTION: Convert property initializer to getter
|
||||||
// ACTION: Create class 'SomeTest'
|
// ACTION: Create class 'SomeTest'
|
||||||
// ACTION: Rename reference
|
// ACTION: Rename reference
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: SomeTest
|
// ERROR: Unresolved reference: SomeTest
|
||||||
|
|
||||||
package testing
|
package testing
|
||||||
|
|||||||
Vendored
-2
@@ -1,8 +1,6 @@
|
|||||||
// "Create class 'Foo'" "false"
|
// "Create class 'Foo'" "false"
|
||||||
// ACTION: Create extension function 'Int.Foo'
|
// ACTION: Create extension function 'Int.Foo'
|
||||||
// ACTION: Rename reference
|
// ACTION: Rename reference
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: Foo
|
// ERROR: Unresolved reference: Foo
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
|||||||
Vendored
-2
@@ -1,8 +1,6 @@
|
|||||||
// "Create class 'Foo'" "false"
|
// "Create class 'Foo'" "false"
|
||||||
// ACTION: Create extension function 'List<T>.Foo'
|
// ACTION: Create extension function 'List<T>.Foo'
|
||||||
// ACTION: Rename reference
|
// ACTION: Rename reference
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: Foo
|
// ERROR: Unresolved reference: Foo
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
|||||||
Vendored
-2
@@ -3,8 +3,6 @@
|
|||||||
// ACTION: Create member function 'B.foo'
|
// ACTION: Create member function 'B.foo'
|
||||||
// ACTION: Rename reference
|
// ACTION: Rename reference
|
||||||
// ACTION: Add 'b =' to argument
|
// ACTION: Add 'b =' to argument
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: foo
|
// ERROR: Unresolved reference: foo
|
||||||
abstract class A {
|
abstract class A {
|
||||||
fun bar(b: Boolean) {}
|
fun bar(b: Boolean) {}
|
||||||
|
|||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
// "Create member function 'foo'" "false"
|
// "Create member function 'foo'" "false"
|
||||||
// ACTION: Rename reference
|
// ACTION: Rename reference
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: foo
|
// ERROR: Unresolved reference: foo
|
||||||
|
|
||||||
class A<T>(val n: T)
|
class A<T>(val n: T)
|
||||||
|
|||||||
-2
@@ -1,8 +1,6 @@
|
|||||||
// "Create member function 'foo'" "false"
|
// "Create member function 'foo'" "false"
|
||||||
// ACTION: Create extension function 'A.foo'
|
// ACTION: Create extension function 'A.foo'
|
||||||
// ACTION: Rename reference
|
// ACTION: Rename reference
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: foo
|
// ERROR: Unresolved reference: foo
|
||||||
|
|
||||||
fun test(): Int {
|
fun test(): Int {
|
||||||
|
|||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
// "Create member function 'foo'" "false"
|
// "Create member function 'foo'" "false"
|
||||||
// ACTION: Add names to call arguments
|
// ACTION: Add names to call arguments
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: x
|
// ERROR: Unresolved reference: x
|
||||||
|
|
||||||
class A<T>(val n: T) {
|
class A<T>(val n: T) {
|
||||||
|
|||||||
-2
@@ -2,8 +2,6 @@
|
|||||||
// ACTION: Create extension function 'A<Int>.bar'
|
// ACTION: Create extension function 'A<Int>.bar'
|
||||||
// ACTION: Create member function 'A.bar'
|
// ACTION: Create member function 'A.bar'
|
||||||
// ACTION: Rename reference
|
// ACTION: Rename reference
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Unresolved reference: bar
|
// ERROR: Unresolved reference: bar
|
||||||
// ERROR: Unresolved reference: foo
|
// ERROR: Unresolved reference: foo
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
// ACTION: Add '@MyExperimentalAPI' annotation to containing class 'Bar'
|
// ACTION: Add '@MyExperimentalAPI' annotation to containing class 'Bar'
|
||||||
// ACTION: Add '@UseExperimental(MyExperimentalAPI::class)' annotation to 'bar'
|
// ACTION: Add '@UseExperimental(MyExperimentalAPI::class)' annotation to 'bar'
|
||||||
// ACTION: Add '-Xuse-experimental=MyExperimentalAPI' to module light_idea_test_case compiler arguments
|
// ACTION: Add '-Xuse-experimental=MyExperimentalAPI' to module light_idea_test_case compiler arguments
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: This declaration is experimental and its usage must be marked with '@MyExperimentalAPI' or '@UseExperimental(MyExperimentalAPI::class)'
|
// ERROR: This declaration is experimental and its usage must be marked with '@MyExperimentalAPI' or '@UseExperimental(MyExperimentalAPI::class)'
|
||||||
// ERROR: This declaration is experimental and its usage must be marked with '@MyExperimentalAPI' or '@UseExperimental(MyExperimentalAPI::class)'
|
// ERROR: This declaration is experimental and its usage must be marked with '@MyExperimentalAPI' or '@UseExperimental(MyExperimentalAPI::class)'
|
||||||
|
|
||||||
|
|||||||
-2
@@ -1,8 +1,6 @@
|
|||||||
// "Make 'doSth' protected" "false"
|
// "Make 'doSth' protected" "false"
|
||||||
// ACTION: Make 'doSth' public
|
// ACTION: Make 'doSth' public
|
||||||
// ACTION: Make 'doSth' internal
|
// ACTION: Make 'doSth' internal
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Cannot access 'doSth': it is private in 'A'
|
// ERROR: Cannot access 'doSth': it is private in 'A'
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
|
|||||||
-2
@@ -3,8 +3,6 @@
|
|||||||
// ACTION: Convert property initializer to getter
|
// ACTION: Convert property initializer to getter
|
||||||
// ACTION: Add names to call arguments
|
// ACTION: Add names to call arguments
|
||||||
// ACTION: Move to constructor
|
// ACTION: Move to constructor
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Cannot access 'bar': it is private in 'First'
|
// ERROR: Cannot access 'bar': it is private in 'First'
|
||||||
|
|
||||||
private data class Data(val x: Int)
|
private data class Data(val x: Int)
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
// ACTION: Convert to block body
|
// ACTION: Convert to block body
|
||||||
// ACTION: Replace overloaded operator with function call
|
// ACTION: Replace overloaded operator with function call
|
||||||
// ACTION: Wrap with '?.let { ... }' call
|
// ACTION: Wrap with '?.let { ... }' call
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Reference has a nullable type '(String.() -> Unit)?', use explicit '?.invoke()' to make a function-like call instead
|
// ERROR: Reference has a nullable type '(String.() -> Unit)?', use explicit '?.invoke()' to make a function-like call instead
|
||||||
|
|
||||||
fun foo(exec: (String.() -> Unit)?) = "".exec<caret>()
|
fun foo(exec: (String.() -> Unit)?) = "".exec<caret>()
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
// ACTION: Introduce local variable
|
// ACTION: Introduce local variable
|
||||||
// ACTION: Add non-null asserted (!!) call
|
// ACTION: Add non-null asserted (!!) call
|
||||||
// ACTION: Replace with safe (?.) 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?
|
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
|
||||||
|
|
||||||
fun foo(arg: Int?) {
|
fun foo(arg: Int?) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
// ACTION: Convert to block body
|
// ACTION: Convert to block body
|
||||||
// ACTION: Introduce local variable
|
// ACTION: Introduce local variable
|
||||||
// ACTION: Replace with safe (?.) 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?
|
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
|
||||||
|
|
||||||
fun foo(arg: Int?) = arg<caret>.hashCode()
|
fun foo(arg: Int?) = arg<caret>.hashCode()
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
// "Surround with null check" "false"
|
// "Surround with null check" "false"
|
||||||
// ACTION: Add non-null asserted (!!) call
|
// ACTION: Add non-null asserted (!!) call
|
||||||
// ACTION: Replace with safe (?.) 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?
|
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
|
||||||
|
|
||||||
fun foo(s: String?) {
|
fun foo(s: String?) {
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
// ACTION: Convert to block body
|
// ACTION: Convert to block body
|
||||||
// ACTION: Introduce local variable
|
// ACTION: Introduce local variable
|
||||||
// ACTION: Replace with safe (?.) 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?
|
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
|
||||||
|
|
||||||
class My(val x: String?) {
|
class My(val x: String?) {
|
||||||
|
|||||||
-2
@@ -1,6 +1,4 @@
|
|||||||
// "Change to property access" "false"
|
// "Change to property access" "false"
|
||||||
// ACTION: Convert to run
|
|
||||||
// ACTION: Convert to with
|
|
||||||
// ERROR: Expression 'fd' of type 'String' cannot be invoked as a function. The function 'invoke()' is not found
|
// ERROR: Expression 'fd' of type 'String' cannot be invoked as a function. The function 'invoke()' is not found
|
||||||
class A(val fd: String)
|
class A(val fd: String)
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
// ACTION: Add non-null asserted (!!) call
|
// ACTION: Add non-null asserted (!!) call
|
||||||
// ACTION: Introduce local variable
|
// ACTION: Introduce local variable
|
||||||
// ACTION: Replace with safe (?.) 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?
|
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
|
||||||
|
|
||||||
fun foo(arg: Int?) {
|
fun foo(arg: Int?) {
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
// ACTION: Convert to block body
|
// ACTION: Convert to block body
|
||||||
// ACTION: Introduce local variable
|
// ACTION: Introduce local variable
|
||||||
// ACTION: Replace with safe (?.) 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?
|
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Int?
|
||||||
|
|
||||||
fun Int.bar() = this
|
fun Int.bar() = this
|
||||||
|
|||||||
Reference in New Issue
Block a user