Check that kotlin.stdlib is explicitly required in module-info

Writing a Jigsaw-modular Kotlin program which doesn't require
kotlin.stdlib doesn't make sense because it most likely will fail at
runtime, on access to anything from the standard library. Previously, we
checked that kotlin.stdlib was in the module graph, but that's not
enough, we should also check that the source module requires it.
'-Xallow-kotlin-package' can be used to disable the error.

Add a test checking that an indirect (transitive) dependency is also OK

(cherry picked from commit 0439abba46)
This commit is contained in:
Alexander Udalov
2018-02-14 11:37:28 +01:00
parent 696bff31f4
commit ff3da15cde
17 changed files with 38 additions and 37 deletions

View File

@@ -1,3 +1,5 @@
module moduleB {
requires moduleA;
requires kotlin.stdlib;
}