Generate Secondary Constructor: Forbid inside of class with explicit primary constructor
This commit is contained in:
+3
-6
@@ -1,10 +1,7 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateSecondaryConstructorAction
|
||||
open class Base(n: Int) {
|
||||
constructor(a: Int, b: Int): this(a + b)
|
||||
}
|
||||
|
||||
class Foo(x: Int) : Base(x) {<caret>
|
||||
val x = 1
|
||||
// NOT_APPLICABLE
|
||||
class Foo(x: Int) {<caret>
|
||||
val x: Int
|
||||
|
||||
fun foo() {
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// ACTION_CLASS: org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateSecondaryConstructorAction
|
||||
open class Base(n: Int) {
|
||||
constructor(a: Int, b: Int): this(a + b)
|
||||
}
|
||||
|
||||
class Foo(x: Int) : Base(x) {
|
||||
val x = 1
|
||||
|
||||
<caret>constructor(a: Int, b: Int) : super(a, b)
|
||||
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user