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
This commit is contained in:
Alexander Udalov
2015-02-09 17:52:42 +03:00
parent b1d9e5c961
commit 949144e0c0
15 changed files with 118 additions and 82 deletions
@@ -244,6 +244,22 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
JetTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), output);
}
public void testIncompleteHierarchyInKotlin() throws Exception {
// Analogous to testIncompleteHierarchyInJava, but with a Kotlin library
File library = copyJarFileWithoutEntry(compileLibrary("library"), "test/Super.class");
File source = new File(getTestDataDirectory(), "source.kt");
Pair<String, ExitCode> pair = CliBaseTest.executeCompilerGrabOutput(new K2JVMCompiler(), Arrays.asList(
source.getPath(),
"-classpath", library.getPath(),
"-d", tmpdir.getPath()
));
JetTestUtils.assertEqualsToFile(new File(getTestDataDirectory(), "output.txt"), pair.first);
}
/*test source mapping generation when source info is absent*/
public void testInlineFunWithoutDebugInfo() throws Exception {
File inlineSource = new File(getTestDataDirectory(), "sourceInline.kt");
@@ -265,7 +281,8 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
//skip debug info
}
}, 0);
} finally {
}
finally {
is.close();
}
@@ -299,7 +316,8 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
debugInfo.set(debug);
}
}, 0);
} finally {
}
finally {
resultStream.close();
}
@@ -316,7 +334,8 @@ public class CompileKotlinAgainstCustomBinariesTest extends TestCaseWithTmpdir {
if (InlineCodegenUtil.GENERATE_SMAP) {
assertEquals(expected, debugInfo.get());
} else {
}
else {
assertEquals(null, debugInfo.get());
}
}