Create from Usage: Suggest "Create secondary constructor" on NONE_APPLICABLE error
#KT-11866 Fixed
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Create secondary constructor" "true"
|
||||
// ERROR: Primary constructor call expected
|
||||
|
||||
class CtorSecondary() {
|
||||
constructor(p: Int) : this()
|
||||
}
|
||||
|
||||
fun construct() {
|
||||
// todo: add this()
|
||||
val vA = <caret>CtorSecondary(2, 3)
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Create secondary constructor" "true"
|
||||
// ERROR: Primary constructor call expected
|
||||
|
||||
class CtorSecondary() {
|
||||
constructor(p: Int) : this()
|
||||
|
||||
constructor<caret>(i: Int, i1: Int)
|
||||
}
|
||||
|
||||
fun construct() {
|
||||
// todo: add this()
|
||||
val vA = CtorSecondary(2, 3)
|
||||
}
|
||||
Reference in New Issue
Block a user