Create from Usage: Suggest "Create secondary constructor" on NONE_APPLICABLE error

#KT-11866 Fixed
This commit is contained in:
Alexey Sedunov
2016-04-14 14:30:58 +03:00
parent aa4bfadfb1
commit beb5d5e271
6 changed files with 41 additions and 4 deletions
@@ -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)
}
@@ -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)
}