Add "Create secondary constructor" quick fix on NONE_APPLICABLE error #KT-22371 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
d32b53362d
commit
5564102a3e
@@ -340,6 +340,7 @@ class QuickFixRegistrar : QuickFixContributor {
|
||||
|
||||
NO_VALUE_FOR_PARAMETER.registerFactory(CreateConstructorFromSuperTypeCallActionFactory)
|
||||
TOO_MANY_ARGUMENTS.registerFactory(CreateConstructorFromSuperTypeCallActionFactory)
|
||||
NONE_APPLICABLE.registerFactory(CreateConstructorFromSuperTypeCallActionFactory)
|
||||
|
||||
UNRESOLVED_REFERENCE_WRONG_RECEIVER.registerFactory(CreateClassFromConstructorCallActionFactory)
|
||||
UNRESOLVED_REFERENCE.registerFactory(CreateClassFromConstructorCallActionFactory)
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// "Create secondary constructor" "true"
|
||||
|
||||
open class A {
|
||||
constructor(x: Int, y: Int)
|
||||
constructor(x: Int, y: String)
|
||||
}
|
||||
|
||||
class B : <caret>A(1)
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Create secondary constructor" "true"
|
||||
|
||||
open class A {
|
||||
constructor(x: Int, y: Int)
|
||||
constructor(x: Int, y: String)
|
||||
constructor(i: Int)
|
||||
}
|
||||
|
||||
class B : A(1)
|
||||
@@ -3825,6 +3825,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
||||
runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallNoClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("superCallNoneApplicable.kt")
|
||||
public void testSuperCallNoneApplicable() throws Exception {
|
||||
runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallNoneApplicable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("thisCall.kt")
|
||||
public void testThisCall() throws Exception {
|
||||
runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/thisCall.kt");
|
||||
|
||||
Reference in New Issue
Block a user