Report error if some deserialized classes are missing in dependencies

Technically we often can compile code which uses missing classes (as long as
nothing is called on them) but it seems better to let the user know something's
wrong in their setup before the error manifests itself at runtime. Also the
Java compiler does the same

 #KT-4328 Fixed
This commit is contained in:
Alexander Udalov
2016-03-10 19:07:40 +03:00
parent accf80a624
commit db5e00bcc0
14 changed files with 141 additions and 13 deletions
@@ -1,4 +1,10 @@
compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencySimple/source.kt:7:7: error: cannot access class 'a.A'. Check your module classpath for missing or conflicting dependencies
b.foo()
^
compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencySimple/source.kt:10:21: error: type mismatch: inferred type is A but String was expected
val x: String = b.foo()
^
compiler/testData/compileKotlinAgainstCustomBinaries/missingDependencySimple/source.kt:10:23: error: cannot access class 'a.A'. Check your module classpath for missing or conflicting dependencies
val x: String = b.foo()
^
COMPILATION_ERROR