ModuleCheck
ModuleCheck copied to clipboard
better handling of declaration visibility
Currently, when parsing java or kotlin, declarations which are private, internal (kotlin), or "package private" (java) are filtered and not counted. protected declarations in either language are treated the same as public.
This quick-and-dirty approach seemed fine because ModuleCheck assumes that it's executing against a project which builds, which means that
- declarations can't be ambiguous (no duplicates)
- declarations can only be referenced if they're visible to the call site.
Unfortunately, declarations can be overloaded, packages can be shared across modules, and those overloaded declarations can be split across modules.