Report incomplete hierarchy error for deserialized types

#KT-5129 Fixed

Delete a JPS test that was specifically testing that we would not fail in this
situation; now there's a compilation error

Original commit: 949144e0c0
This commit is contained in:
Alexander Udalov
2015-02-09 17:52:42 +03:00
parent 987946f425
commit f12cce0243
@@ -25,54 +25,11 @@ import org.jetbrains.kotlin.test.JetTestUtils
import java.io.File import java.io.File
public class SimpleKotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() { public class SimpleKotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
workDir = JetTestUtils.tmpDirForTest(this) workDir = JetTestUtils.tmpDirForTest(this)
} }
public fun testThreeModulesNoReexport() {
val aFile = createFile("a/a.kt",
"""
trait A1 {
fun bar()
}
trait A2 {
fun bar()
}
""")
val a = addModule("a", PathUtil.getParentPath(aFile))
val bFile = createFile("b/b.kt",
"""
trait B1 {
fun foo(): B2? = null
}
trait B2 : A1, A2 {
override fun bar() {}
}
""")
val b = addModule("b", PathUtil.getParentPath(bFile))
JpsJavaExtensionService.getInstance().getOrCreateDependencyExtension(
b.getDependenciesList().addModuleDependency(a)
).setExported(false)
val cFile = createFile("c/c.kt",
"""
class C : B1 {
fun test() {
foo()?.bar()
}
}
""")
val c = addModule("c", PathUtil.getParentPath(cFile))
c.getDependenciesList().addModuleDependency(b)
addKotlinRuntimeDependency()
rebuildAll()
}
public fun testLoadingKotlinFromDifferentModules() { public fun testLoadingKotlinFromDifferentModules() {
val aFile = createFile("m1/K.kt", val aFile = createFile("m1/K.kt",
""" """
@@ -102,21 +59,21 @@ public class SimpleKotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
""") """)
val b = addModule("b", PathUtil.getParentPath(bFile)) val b = addModule("b", PathUtil.getParentPath(bFile))
JpsJavaExtensionService.getInstance().getOrCreateDependencyExtension( JpsJavaExtensionService.getInstance().getOrCreateDependencyExtension(
b.getDependenciesList().addModuleDependency(a) b.dependenciesList.addModuleDependency(a)
).setExported(false) ).isExported = false
addKotlinRuntimeDependency() addKotlinRuntimeDependency()
rebuildAll() rebuildAll()
} }
public fun testThreeModulesNoReexportWithDaemon() { public fun testDaemon() {
System.setProperty(COMPILE_DAEMON_ENABLED_PROPERTY,"") System.setProperty(COMPILE_DAEMON_ENABLED_PROPERTY,"")
System.setProperty(COMPILE_DAEMON_VERBOSE_REPORT_PROPERTY, "") System.setProperty(COMPILE_DAEMON_VERBOSE_REPORT_PROPERTY, "")
// spaces in the name to test proper file name handling // spaces in the name to test proper file name handling
val flagFile = File.createTempFile("kotlin-jps - tests-", "-is-running"); val flagFile = File.createTempFile("kotlin-jps - tests-", "-is-running");
try { try {
System.setProperty(COMPILE_DAEMON_CLIENT_ALIVE_PATH_PROPERTY, flagFile.absolutePath) System.setProperty(COMPILE_DAEMON_CLIENT_ALIVE_PATH_PROPERTY, flagFile.absolutePath)
testThreeModulesNoReexport() testLoadingKotlinFromDifferentModules()
} }
finally { finally {
flagFile.delete() flagFile.delete()