Move: KT-8955

Fix NPE on moving directory where at least one Kotlin file
contains package directive unmatched by the containing directory

 #KT-8955 Fixed
This commit is contained in:
Alexey Sedunov
2017-03-09 23:43:16 +03:00
parent d1857d68bc
commit 2f136dae1c
20 changed files with 58 additions and 5 deletions
@@ -0,0 +1,12 @@
<?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" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
@@ -0,0 +1,5 @@
package y
fun foo() {
}
@@ -0,0 +1,12 @@
<?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" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
@@ -0,0 +1,5 @@
package y
fun foo() {
}
@@ -0,0 +1,7 @@
{
"mainFile": "A/src/x/test.kt",
"type": "MOVE_DIRECTORY_WITH_CLASSES",
"sourceDir": "A/src/x",
"targetDir": "A/src/z",
"isMultiModule": "true"
}