This message was deleted.
# compiler
s
This message was deleted.
d
If it happens, something will break (most likely some checker would return a conflict error). So make sure your extension doesn't do it.
The compiler expects that everything is generated by plugins entirely correct. If the plugin breaks this assumption, something could go wrong in unpredictable ways.
Informal definition: compiler accepts this declaration if it was written manually in code (by hand, not by plugin). Can't provide a formal definition.
It's trickier with such deep manipulations actually, and it always depends on the specific case. Your idea of changing everything to private could break in various places when internal declaration is actually accessible in some way. E.g. it's allowed to call internals of the main module in the test module. Or you could have public open class with an internal member and inheritor of it in the other module, and compiler could try to generate a bridge method to this internal from the base class (can't provide the exact example though).