QuickFix for PARAMETER_NAME_CHANGED_ON_OVERRIDE.
It renames method parameter to match the name from the overriden method.
This commit is contained in:
committed by
Andrey Breslav
parent
c296cbf6d1
commit
b6870b4bba
+15
@@ -0,0 +1,15 @@
|
||||
// "Rename parameter to match overridden method" "true"
|
||||
abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
trait X {
|
||||
fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
class B : A(), X {
|
||||
override fun foo(var arg: Int) : Int {
|
||||
arg += 5
|
||||
return arg
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Rename parameter to match overridden method" "true"
|
||||
abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun foo(var arg: Int) : Int {
|
||||
arg += 5
|
||||
return arg
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// "Rename parameter to match overridden method" "false"
|
||||
abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
trait X {
|
||||
fun foo(agr: Int) : Int;
|
||||
}
|
||||
|
||||
class B : A(), X {
|
||||
override fun foo(var arg<caret>: Int) : Int {
|
||||
arg += 5
|
||||
return arg
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Rename parameter to match overridden method" "true"
|
||||
abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
trait X {
|
||||
fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
class B : A(), X {
|
||||
override fun foo(var agr<caret> : Int) : Int {
|
||||
agr += 5
|
||||
return agr
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Rename parameter to match overridden method" "true"
|
||||
abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
class B : A() {
|
||||
override fun foo(var agr<caret> : Int) : Int {
|
||||
agr += 5
|
||||
return agr
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user