K2 JVM: implement Java modules-related checkers

All existing tests use custom test data for FIR because the diagnostic
text in FIR has to have a dot at the end. Also, the K2 checker doesn't
check usages in imports because there are no "import checkers" in K2
right now, this will need to be fixed later if necessary.

 #KT-60797 Fixed
This commit is contained in:
Alexander Udalov
2024-02-15 12:50:41 +01:00
committed by Space Team
parent ac901c6d07
commit 5ca7ab9801
23 changed files with 343 additions and 38 deletions
@@ -0,0 +1,7 @@
compiler/testData/javaModules/specifyPathToModuleInfoInArguments/moduleB/usage.kt:9:5: error: symbol is declared in module 'moduleA' which does not export package 'unexported'.
Unexported()
^^^^^^^^^^
compiler/testData/javaModules/specifyPathToModuleInfoInArguments/moduleB/usage.kt:13:5: error: unresolved reference 'Unrelated'.
Unrelated()
^^^^^^^^^
COMPILATION_ERROR