Add "Make private and overrides member" quick fix for ACCIDENTAL_OVERRIDE
#KT-18536 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
30b98aaeb7
commit
d72e55d1b7
+4
@@ -0,0 +1,4 @@
|
||||
public interface JavaInterface {
|
||||
String getName(String name);
|
||||
String getName();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Make private and implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(private val name: String) : JavaInterface {
|
||||
override fun getName(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
public interface JavaInterface {
|
||||
String getName(String name);
|
||||
String getName();
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Make private and implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(<caret>val name: String) : JavaInterface {
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Implements 'getName'" "false"
|
||||
// DISABLE-ERRORS
|
||||
// ACTION: Convert to secondary constructor
|
||||
// ACTION: Create test
|
||||
// ACTION: Make private
|
||||
// ACTION: Make protected
|
||||
// ACTION: Make public
|
||||
// ACTION: Move to class body
|
||||
class A(<caret>internal val name: String) : JavaInterface {
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(private val name: String) : JavaInterface {
|
||||
override fun getName(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(<caret>private val name: String) : JavaInterface {
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Make private and implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(private val name: String) : JavaInterface {
|
||||
override fun getName(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Make private and implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(<caret>protected val name: String) : JavaInterface {
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Make private and implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(private val name: String) : JavaInterface {
|
||||
override fun getName(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Make private and implements 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(<caret>public val name: String) : JavaInterface {
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
public abstract class JavaClass {
|
||||
abstract String getName();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Make private and overrides 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class B : JavaClass() {
|
||||
private val name: String = ""
|
||||
override fun getName(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
public abstract class JavaClass {
|
||||
abstract String getName();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Make private and overrides 'getName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class B : JavaClass() {
|
||||
<caret>val name: String = ""
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
|
||||
void setName();
|
||||
|
||||
void setName(String name);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Make private and implements 'setName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(private var name: String) : JavaInterface {
|
||||
override fun setName(name: String?) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
public interface JavaInterface {
|
||||
String getName();
|
||||
|
||||
void setName();
|
||||
|
||||
void setName(String name);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Make private and implements 'setName'" "true"
|
||||
// DISABLE-ERRORS
|
||||
class A(<caret>var name: String) : JavaInterface {
|
||||
override fun getName(): String {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user