Move: Fix conflict checking when switching between similar libraries

#KT-17006 Fixed
This commit is contained in:
Alexey Sedunov
2017-03-23 21:07:34 +03:00
parent 45b8cd29e1
commit 298ee266c3
25 changed files with 338 additions and 16 deletions
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,14 @@
package packJvm
class ClassUsageJs {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
@JsName("bar")
fun foo() {
}
}
@@ -0,0 +1,17 @@
package packJvm
class ClassUsageJvm {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
companion object {
@JvmStatic fun foo() {
}
}
}
class Foo
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,17 @@
package packJvm
class ClassUsageJvm {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
companion object {
@JvmStatic fun foo() {
}
}
}
class Foo
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,16 @@
package packJs
class <caret>ClassUsageJs {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
@JsName("bar")
fun foo() {
}
}
class Foo
@@ -0,0 +1 @@
Constructor JsName(String), referenced in function packJs.ClassUsageJs.foo(), will not be accessible in module A
@@ -0,0 +1,10 @@
{
"mainFile": "B/src/packJs/testJs.kt",
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
"targetPackage": "packJvm",
"targetSourceRoot": "A/src",
"isMultiModule": "true",
"withRuntime": "true",
"modulesWithRuntime": ["A"],
"modulesWithJsRuntime": ["B"]
}
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,15 @@
package packJs
class ClassUsageJvm {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
companion object {
@JvmStatic fun foo() {
}
}
}
@@ -0,0 +1,16 @@
package packJs
class ClassUsageJs {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
@JsName("bar")
fun foo() {
}
}
class Foo
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,17 @@
package packJvm
class <caret>ClassUsageJvm {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
companion object {
@JvmStatic fun foo() {
}
}
}
class Foo
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<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>
@@ -0,0 +1,16 @@
package packJs
class ClassUsageJs {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
@JsName("bar")
fun foo() {
}
}
class Foo
@@ -0,0 +1 @@
Constructor JvmStatic(), referenced in function packJvm.ClassUsageJvm.Companion.foo(), will not be accessible in module B
@@ -0,0 +1,10 @@
{
"mainFile": "A/src/packJvm/testJvm.kt",
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
"targetPackage": "packJs",
"targetSourceRoot": "B/src",
"isMultiModule": "true",
"withRuntime": "true",
"modulesWithRuntime": ["A"],
"modulesWithJsRuntime": ["B"]
}