Always treat all sources as parts of the module being compiled

If a path to the module-info.java file is passed as an argument, we
should treat all other source files passed as arguments (either as
individual source files or inside a source directory) as members of that
module. Previously we treated other source files as members of the
unnamed module, and this resulted in incorrect errors when using a
member exported with a qualification from another named module, for
example

 #KT-18598 In Fixed
This commit is contained in:
Alexander Udalov
2017-06-28 19:03:43 +03:00
parent 5192f946c5
commit 8c21ff66a4
10 changed files with 78 additions and 9 deletions
@@ -28,8 +28,9 @@ interface JavaModule {
val name: String
/**
* A directory or the root of a .jar file on the module path. In case of an explicit module,
* module-info.class file can be found in its children.
* A directory or the root of a .jar file on the module path. Can also be the path to the `module-info.java` file if that path
* was passed as an explicit argument to the compiler.
* In case of an explicit module, module-info.class file can be found in its children.
*/
val moduleRoot: VirtualFile