Change Signature: Support constructors of header/impl classes
This commit is contained in:
+4
-1
@@ -181,7 +181,10 @@ object HeaderImplDeclarationChecker : DeclarationChecker {
|
|||||||
listOf(module.getPackage(containingDeclaration.fqName).memberScope)
|
listOf(module.getPackage(containingDeclaration.fqName).memberScope)
|
||||||
}
|
}
|
||||||
is ClassDescriptor -> {
|
is ClassDescriptor -> {
|
||||||
containingDeclaration.findClassifiersFromModule(module).mapNotNull { (it as? ClassDescriptor)?.unsubstitutedMemberScope }
|
val classes = containingDeclaration.findClassifiersFromModule(module).filterIsInstance<ClassDescriptor>()
|
||||||
|
if (this is ConstructorDescriptor) return classes.flatMap { it.constructors }
|
||||||
|
|
||||||
|
classes.map { it.unsubstitutedMemberScope }
|
||||||
}
|
}
|
||||||
else -> return emptyList()
|
else -> return emptyList()
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-7
@@ -32,10 +32,7 @@ import org.jetbrains.kotlin.idea.highlighter.markers.headerImplementations
|
|||||||
import org.jetbrains.kotlin.idea.highlighter.markers.isHeaderOrHeaderClassMember
|
import org.jetbrains.kotlin.idea.highlighter.markers.isHeaderOrHeaderClassMember
|
||||||
import org.jetbrains.kotlin.idea.refactoring.changeSignature.usages.KotlinCallableDefinitionUsage
|
import org.jetbrains.kotlin.idea.refactoring.changeSignature.usages.KotlinCallableDefinitionUsage
|
||||||
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers
|
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers
|
||||||
import org.jetbrains.kotlin.psi.KtCallableDeclaration
|
import org.jetbrains.kotlin.psi.*
|
||||||
import org.jetbrains.kotlin.psi.KtClass
|
|
||||||
import org.jetbrains.kotlin.psi.KtFunction
|
|
||||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
|
||||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@@ -99,14 +96,22 @@ class KotlinChangeSignatureData(
|
|||||||
|
|
||||||
override val affectedCallables: Collection<UsageInfo> by lazy {
|
override val affectedCallables: Collection<UsageInfo> by lazy {
|
||||||
primaryCallables + primaryCallables.flatMapTo(HashSet<UsageInfo>()) { primaryFunction ->
|
primaryCallables + primaryCallables.flatMapTo(HashSet<UsageInfo>()) { primaryFunction ->
|
||||||
val primaryDeclaration = primaryFunction.declaration as? KtCallableDeclaration ?: return@flatMapTo emptyList()
|
val primaryDeclaration = primaryFunction.declaration as? KtDeclaration ?: return@flatMapTo emptyList()
|
||||||
|
|
||||||
if (primaryDeclaration.isHeaderOrHeaderClassMember()) {
|
if (primaryDeclaration.isHeaderOrHeaderClassMember()) {
|
||||||
return@flatMapTo primaryDeclaration.headerImplementations().map {
|
return@flatMapTo primaryDeclaration.headerImplementations().mapNotNull {
|
||||||
KotlinCallableDefinitionUsage<PsiElement>(it, it.resolveToDescriptor() as CallableDescriptor, primaryFunction, null)
|
val descriptor = it.resolveToDescriptor()
|
||||||
|
val callableDescriptor = when (descriptor) {
|
||||||
|
is CallableDescriptor -> descriptor
|
||||||
|
is ClassDescriptor -> descriptor.unsubstitutedPrimaryConstructor ?: return@mapNotNull null
|
||||||
|
else -> return@mapNotNull null
|
||||||
|
}
|
||||||
|
KotlinCallableDefinitionUsage<PsiElement>(it, callableDescriptor, primaryFunction, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (primaryDeclaration !is KtCallableDeclaration) return@flatMapTo emptyList()
|
||||||
|
|
||||||
primaryDeclaration.toLightMethods().flatMap { baseMethod ->
|
primaryDeclaration.toLightMethods().flatMap { baseMethod ->
|
||||||
OverridingMethodsSearch
|
OverridingMethodsSearch
|
||||||
.search(baseMethod)
|
.search(baseMethod)
|
||||||
|
|||||||
-2
@@ -229,8 +229,6 @@ class KotlinChangeSignatureUsageProcessor : ChangeSignatureUsageProcessor {
|
|||||||
for (reference in findReferences(functionPsi)) {
|
for (reference in findReferences(functionPsi)) {
|
||||||
val element = reference.element
|
val element = reference.element
|
||||||
|
|
||||||
if (functionPsi is KtClass && reference.resolve() !== functionPsi) continue
|
|
||||||
|
|
||||||
if (element is KtReferenceExpression) {
|
if (element is KtReferenceExpression) {
|
||||||
var parent = element.parent
|
var parent = element.parent
|
||||||
|
|
||||||
|
|||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(n: Int, b: Boolean)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
constructor(n: Int, b: Boolean): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int, b: Boolean) {
|
||||||
|
constructor(s: String): this(1, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class <caret>C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
constructor(n: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int) {
|
||||||
|
constructor(s: String): this(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class <caret>C
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C()
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C()
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C()
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C()
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(s: String) {
|
||||||
|
constructor(n: Int, b: Boolean): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1, false)
|
||||||
|
C("1")
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
constructor(n: Int, b: Boolean): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int, b: Boolean) {
|
||||||
|
constructor(s: String): this(1, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(s: String) {
|
||||||
|
<caret>constructor(n: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
C("1")
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
constructor(n: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int) {
|
||||||
|
constructor(s: String): this(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(n: Int, b: Boolean)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
constructor(n: Int, b: Boolean): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int, b: Boolean) {
|
||||||
|
constructor(s: String): this(1, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
idea/testData/refactoring/changeSignatureMultiModule/implPrimaryConstructor/before/Common/Common.iml
Vendored
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
constructor(n: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C<caret>(n: Int) {
|
||||||
|
constructor(s: String): this(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int)
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C()
|
||||||
|
}
|
||||||
idea/testData/refactoring/changeSignatureMultiModule/implPrimaryConstructorNoParams/before/JS/JS.iml
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C()
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C()
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class <caret>C
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C()
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(s: String) {
|
||||||
|
constructor(n: Int, b: Boolean): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1, false)
|
||||||
|
C("1")
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
constructor(n: Int, b: Boolean): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int, b: Boolean) {
|
||||||
|
constructor(s: String): this(1, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1, false)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="Common (experimental) " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
header class C(s: String) {
|
||||||
|
constructor(n: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C(1)
|
||||||
|
C("1")
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JavaScript " useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(s: String) {
|
||||||
|
<caret>constructor(n: Int): this("")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="kotlin-language" name="Kotlin">
|
||||||
|
<configuration version="2" platform="JVM 1.6" useProjectSettings="false">
|
||||||
|
<compilerSettings/>
|
||||||
|
<compilerArguments/>
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="Common" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
impl class C(n: Int) {
|
||||||
|
constructor(s: String): this(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
C("1")
|
||||||
|
C(1)
|
||||||
|
}
|
||||||
+1
-1
@@ -62,7 +62,7 @@ import java.util.*
|
|||||||
|
|
||||||
class KotlinChangeSignatureTest : KotlinLightCodeInsightFixtureTestCase() {
|
class KotlinChangeSignatureTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||||
companion object {
|
companion object {
|
||||||
private val BUILT_INS = DefaultBuiltIns.Instance
|
internal val BUILT_INS = DefaultBuiltIns.Instance
|
||||||
private val EXTENSIONS = arrayOf(".kt", ".java")
|
private val EXTENSIONS = arrayOf(".kt", ".java")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+38
@@ -23,7 +23,9 @@ import org.jetbrains.kotlin.idea.test.KotlinMultiFileTestCase
|
|||||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||||
import org.jetbrains.kotlin.idea.test.extractMarkerOffset
|
import org.jetbrains.kotlin.idea.test.extractMarkerOffset
|
||||||
import org.jetbrains.kotlin.psi.KtElement
|
import org.jetbrains.kotlin.psi.KtElement
|
||||||
|
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||||
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
|
||||||
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
|
|
||||||
class KotlinMultiModuleChangeSignatureTest : KotlinMultiFileTestCase() {
|
class KotlinMultiModuleChangeSignatureTest : KotlinMultiFileTestCase() {
|
||||||
init {
|
init {
|
||||||
@@ -48,6 +50,18 @@ class KotlinMultiModuleChangeSignatureTest : KotlinMultiFileTestCase() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun KotlinChangeInfo.addParameter(name: String, type: KotlinType, defaultValue: String) {
|
||||||
|
addParameter(
|
||||||
|
KotlinParameterInfo(
|
||||||
|
originalBaseFunctionDescriptor,
|
||||||
|
-1,
|
||||||
|
name,
|
||||||
|
KotlinTypeInfo(false, type),
|
||||||
|
defaultValueForCall = KtPsiFactory(project).createExpression(defaultValue)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
fun testHeadersAndImplsByHeaderFun() = doTest("Common/src/test/test.kt") {
|
fun testHeadersAndImplsByHeaderFun() = doTest("Common/src/test/test.kt") {
|
||||||
newName = "baz"
|
newName = "baz"
|
||||||
}
|
}
|
||||||
@@ -63,4 +77,28 @@ class KotlinMultiModuleChangeSignatureTest : KotlinMultiFileTestCase() {
|
|||||||
fun testHeadersAndImplsByImplClassMemberFun() = doTest("JS/src/test/test.kt") {
|
fun testHeadersAndImplsByImplClassMemberFun() = doTest("JS/src/test/test.kt") {
|
||||||
newName = "baz"
|
newName = "baz"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun testHeaderPrimaryConstructorNoParams() = doTest("Common/src/test/test.kt") {
|
||||||
|
addParameter("n", KotlinChangeSignatureTest.BUILT_INS.intType, "1")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testHeaderPrimaryConstructor() = doTest("Common/src/test/test.kt") {
|
||||||
|
addParameter("b", KotlinChangeSignatureTest.BUILT_INS.booleanType, "false")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testHeaderSecondaryConstructor() = doTest("Common/src/test/test.kt") {
|
||||||
|
addParameter("b", KotlinChangeSignatureTest.BUILT_INS.booleanType, "false")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testImplPrimaryConstructorNoParams() = doTest("JVM/src/test/test.kt") {
|
||||||
|
addParameter("n", KotlinChangeSignatureTest.BUILT_INS.intType, "1")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testImplPrimaryConstructor() = doTest("JVM/src/test/test.kt") {
|
||||||
|
addParameter("b", KotlinChangeSignatureTest.BUILT_INS.booleanType, "false")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testImplSecondaryConstructor() = doTest("JS/src/test/test.kt") {
|
||||||
|
addParameter("b", KotlinChangeSignatureTest.BUILT_INS.booleanType, "false")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user