-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create secondary constructor: fill 'this()' arguments
#KT-11865 Fixed
- Loading branch information
1 parent
e271015
commit eff5700
Showing
6 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
idea/testData/quickfix/createFromUsage/createSecondaryConstructor/tooManyArguments.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// "Create secondary constructor" "true" | ||
|
||
class CtorPrimary(val f1: Int, val f2: Int?) | ||
|
||
fun construct() { | ||
val v6 = CtorPrimary(1, 2, 3<caret>) | ||
} |
9 changes: 9 additions & 0 deletions
9
idea/testData/quickfix/createFromUsage/createSecondaryConstructor/tooManyArguments.kt.after
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// "Create secondary constructor" "true" | ||
|
||
class CtorPrimary(val f1: Int, val f2: Int?) { | ||
constructor(f1: Int, f2: Int, i: Int) : this(f1, f2) | ||
} | ||
|
||
fun construct() { | ||
val v6 = CtorPrimary(1, 2, 3) | ||
} |
8 changes: 8 additions & 0 deletions
8
...ickfix/createFromUsage/createSecondaryConstructor/tooManyArgumentsWithImcompatibleType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// "Create secondary constructor" "true" | ||
// DISABLE-ERRORS | ||
|
||
class CtorPrimary(val f1: Int, val f2: String) | ||
|
||
fun construct() { | ||
val v6 = CtorPrimary(1, 2, 3<caret>) | ||
} |
10 changes: 10 additions & 0 deletions
10
.../createFromUsage/createSecondaryConstructor/tooManyArgumentsWithImcompatibleType.kt.after
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// "Create secondary constructor" "true" | ||
// DISABLE-ERRORS | ||
|
||
class CtorPrimary(val f1: Int, val f2: String) { | ||
constructor(f1: Int, f2: Int, i: Int) : this() | ||
} | ||
|
||
fun construct() { | ||
val v6 = CtorPrimary(1, 2, 3) | ||
} |
10 changes: 10 additions & 0 deletions
10
idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.