Corrected quickfix to correct signature of method with 'override' to:

- not loose annotations and other stuff
  - not include visibility modifiers into the name and into the code generated
This commit is contained in:
Valentin Kipyatkov
2014-10-04 01:30:57 +04:00
parent 89ea4d5a85
commit 317607db70
9 changed files with 60 additions and 41 deletions
@@ -1,4 +1,4 @@
// "Change function signature to 'public override fun f(a: Int)'" "true"
// "Change function signature to 'override fun f(a: Int)'" "true"
trait A {
fun f(a: Int)
}
@@ -0,0 +1,10 @@
// "Change function signature to 'override fun f(a: Int)'" "true"
annotation class annon
open class A {
open fun f(a: Int) {}
}
class B : A(){
annon <caret>override fun f(a: Int) {}
}
@@ -1,6 +1,6 @@
// "Change function signature to 'protected override fun next(p0: Int): Int'" "true"
// "Change function signature to 'override fun next(p0: Int): Int'" "true"
import java.util.Random
class MyRandom : Random() {
<caret>protected override fun next(p0: Int): Int = 4
<caret>override fun next(p0: Int): Int = 4
}
@@ -1,4 +1,4 @@
// "Change function signature to 'public override fun f(a: Int)'" "true"
// "Change function signature to 'override fun f(a: Int)'" "true"
trait A {
fun f(a: Int)
}
@@ -0,0 +1,10 @@
// "Change function signature to 'override fun f(a: Int)'" "true"
annotation class annon
open class A {
open fun f(a: Int) {}
}
class B : A(){
annon <caret>override fun f(a: String) {}
}
@@ -1,4 +1,4 @@
// "Change function signature to 'protected override fun next(p0: Int): Int'" "true"
// "Change function signature to 'override fun next(p0: Int): Int'" "true"
import java.util.Random
class MyRandom : Random() {