Better test data
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change type arguments to <*, *>" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeToStarProjectionFix" "false"
|
||||
// ACTION: Convert to expression body
|
||||
|
||||
class Constructor<out T>(val x: T)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change type arguments to <>" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ChangeToStarProjectionFix" "false"
|
||||
// ACTION: Convert to expression body
|
||||
fun <T> get(column: String, map: Map<String, Any>): T {
|
||||
return map[column] as <caret>T
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add type 'Int' to parameter 'bar'" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddTypeAnnotationToValueParameterFix" "false"
|
||||
// ERROR: A type annotation is required on a value parameter
|
||||
// ACTION: Create test
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ERROR: Missing 'getValue(Nothing?, KProperty<*>)' method on delegate of type 'String'
|
||||
// ACTION: To raw string literal
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ACTION: Create extension function 'H?.inc'
|
||||
// ACTION: Create member function 'H.inc'
|
||||
// ACTION: Replace overloaded operator with function call
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ERROR: Unresolved reference: foo()["str"]
|
||||
// ERROR: No get method providing array access
|
||||
// ACTION: Create extension function 'Some.get'
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ERROR: Unresolved reference: foo()["str"]
|
||||
// ERROR: No set method providing array access
|
||||
// ACTION: Create extension function 'Some.set'
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ERROR: Unresolved reference: foo()["str"]
|
||||
// ERROR: No get method providing array access
|
||||
// ACTION: Create extension function 'Some.get'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ERROR: Unresolved reference: foo
|
||||
// ACTION: Create extension function 'H.foo'
|
||||
// ACTION: Create member function 'H.foo'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ERROR: Expression 'Some()' of type 'Some' cannot be invoked as a function. The function 'invoke()' is not found
|
||||
// ACTION: Create extension function 'Some.invoke'
|
||||
// ACTION: Create member function 'Some.invoke'
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
|
||||
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
|
||||
// ACTION: Create extension function 'Some.component1'
|
||||
// ACTION: Create member function 'Some.component1'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Add non-null asserted (!!) call" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddExclExclCallFix" "false"
|
||||
// ACTION: Replace with a 'forEach' function call
|
||||
// ACTION: Surround with null check
|
||||
// ERROR: Not nullable value required to call an 'iterator()' method on for-loop range
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Lift assignment out of 'try' expression" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.LiftAssignmentOutOfTryFix" "false"
|
||||
// ACTION: Make variable mutable
|
||||
// ERROR: Val cannot be reassigned
|
||||
// WITH_RUNTIME
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Lift assignment out of 'try' expression" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.LiftAssignmentOutOfTryFix" "false"
|
||||
// ACTION: Make variable mutable
|
||||
// ERROR: Val cannot be reassigned
|
||||
// ERROR: Val cannot be reassigned
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Implement interface" "false"
|
||||
// "class org.jetbrains.kotlin.idea.intentions.CreateKotlinSubClassIntention" "false"
|
||||
// ACTION: Convert function to property
|
||||
// ACTION: Convert member to extension
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Implement abstract class" "false"
|
||||
// "class org.jetbrains.kotlin.idea.intentions.CreateKotlinSubClassIntention" "false"
|
||||
|
||||
fun foo() {
|
||||
abstract class <caret>My {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// "Implement abstract class" "false"
|
||||
// "class org.jetbrains.kotlin.idea.intentions.CreateKotlinSubClassIntention" "false"
|
||||
|
||||
abstract class Base(val x: Int)
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// "Implement abstract class" "false"
|
||||
// "class org.jetbrains.kotlin.idea.intentions.CreateKotlinSubClassIntention" "false"
|
||||
|
||||
abstract class Base private constructor
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Insert 'this()' call" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.InsertDelegationCallQuickfix" "false"
|
||||
// ACTION: Insert 'super()' call
|
||||
// ERROR: Explicit 'this' or 'super' call is required. There is no constructor in superclass that can be called without arguments
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Insert 'super()' call" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.InsertDelegationCallQuickfix" "false"
|
||||
// ACTION: Insert 'this()' call
|
||||
// ERROR: Primary constructor call expected
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Make 'x' final" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddModifierFix" "false"
|
||||
// ACTION: Convert property initializer to getter
|
||||
|
||||
open class My(open val x: Int) {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Make 'My' final" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddModifierFix" "false"
|
||||
// ACTION: Add 'my =' to argument
|
||||
|
||||
abstract class My {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Make 'My' final" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddModifierFix" "false"
|
||||
// ACTION: Add 'my =' to argument
|
||||
|
||||
open class My {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Make constructor parameter a property" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.MakeConstructorParameterPropertyFix" "false"
|
||||
// ERROR: Cannot access 'foo': it is invisible (private in a supertype) in 'A'
|
||||
|
||||
open class Base(private val foo: String)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Add arrayOf wrapper" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddArrayOfTypeFix" "false"
|
||||
// ACTION: Add 'value =' to argument
|
||||
// ACTION: Create test
|
||||
// ACTION: Make internal
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Add non-null asserted (!!) call" "false"
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.AddExclExclCallFix" "false"
|
||||
// ACTION: Change parameter 's' type of function 'other' to 'String?'
|
||||
// ACTION: Create function 'other'
|
||||
// ERROR: Type mismatch: inferred type is String? but Int was expected
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
// "Move else branch to the end" "false"
|
||||
// ERROR: 'else' entry must be the last one in a when-expression
|
||||
// ERROR: 'else' entry must be the last one in a when-expression
|
||||
// ERROR: Unreachable code
|
||||
// ERROR: Unreachable code
|
||||
package foo
|
||||
|
||||
fun foo() {
|
||||
var i = 2
|
||||
when (i) {
|
||||
1, 2 -> { /* some code */ }
|
||||
el<caret>se -> { /* first else branch */ }
|
||||
else -> { /* second else branch */ }
|
||||
3 -> { /* some other code */ }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user