Check that quick fixes don't produce new errors

This commit is contained in:
Nikolay Krasko
2012-06-27 17:41:21 +04:00
parent 0f2b3dbf14
commit bade0e0275
24 changed files with 68 additions and 24 deletions
@@ -1,4 +1,4 @@
// "Make 'foo' not abstract" "true"
class A() {
<caret>fun foo()
fun foo() {}
}
@@ -1,4 +1,4 @@
// "Make 'i' not abstract" "true"
class A() {
<caret>var i : Int
var i : Int = 0
}
@@ -1,5 +1,5 @@
// "Make 'i' not abstract" "true"
class B {
<caret>val i: Int
val i: Int = 0
get() = $i
}
@@ -1,5 +1,5 @@
// "Make 'j' not abstract" "true"
class B {
<caret>var j: Int
var j: Int = 0
set(v: Int) {}
}
@@ -1,2 +1,2 @@
// "Make 'foo' not abstract" "true"
<caret>fun foo()
fun foo() {}
@@ -1,4 +1,4 @@
// "Make 'foo' not abstract" "true"
class A() {
<caret>abstract fun foo()
<caret>abstract fun foo() {}
}
@@ -1,4 +1,4 @@
// "Make 'i' not abstract" "true"
class A() {
<caret>abstract var i : Int
<caret>abstract var i : Int = 0
}
@@ -1,5 +1,5 @@
// "Make 'i' not abstract" "true"
class B {
<caret>abstract val i: Int
<caret>abstract val i: Int = 0
get() = $i
}
@@ -1,5 +1,5 @@
// "Make 'j' not abstract" "true"
class B {
abstract<caret> var j: Int
abstract<caret> var j: Int = 0
set(v: Int) {}
}
@@ -1,2 +1,2 @@
// "Make 'foo' not abstract" "true"
<caret>abstract fun foo()
<caret>abstract fun foo() {}
@@ -4,5 +4,5 @@ package some
import kotlin.util.measureTimeNano
fun testFun() {
measureTimeNano()
measureTimeNano({})
}
@@ -1,4 +1,6 @@
// "Import Class" "false"
// ERROR: Unresolved reference: some[12]
// ERROR: No get method providing array access
package Teting
@@ -2,5 +2,5 @@
package some
fun testFun() {
<caret>measureTimeNano()
<caret>measureTimeNano({})
}
@@ -1,4 +1,6 @@
// "Import Class" "false"
// ERROR: Unresolved reference: someFun
// ERROR: Unresolved reference: test
package Teting
@@ -1,4 +1,6 @@
// "Import Class" "false"
// ERROR: Unresolved reference: some[12]
// ERROR: No get method providing array access
package Teting
@@ -1,4 +1,4 @@
// "Remove unnecessary non-null assertion (!!)" "true"
fun test(value : Int) : Int {
value<caret>
return value<caret>
}
@@ -1,4 +1,4 @@
// "Replace with dot call" "true"
fun test(value : String) : Int {
return value<caret>.length()
fun test(value : String) {
value<caret>.equals("test")
}
@@ -1,4 +1,4 @@
// "Remove unnecessary non-null assertion (!!)" "true"
fun test(value : Int) : Int {
value<caret>!!
return value<caret>!!
}
@@ -1,4 +1,4 @@
// "Replace with dot call" "true"
fun test(value : String) : Int {
return value<caret>!!.length()
fun test(value : String) {
value!!<caret>.equals("test")
}
@@ -1,6 +1,6 @@
// "Add 'override' modifier" "true"
open class A() {
fun foo() {}
open fun foo() {}
}
class B() : A() {
@@ -1,6 +1,6 @@
// "Add 'override' modifier" "true"
open class A() {
fun foo() {}
open fun foo() {}
}
class B() : A() {
@@ -1,4 +1,6 @@
// "Specify type explicitly" "false"
// ERROR: Public or protected member should have specified type
// ERROR: Unresolved reference: foo
class A() {
public val <caret>t = foo()
@@ -1,4 +1,5 @@
// "Specify return type explicitly" "false"
// ERROR: Function 'foo' without a body must be abstract
package a
class A() {