957b100cd1
SyntheticAccessorLowering was initially implemented under the assumption that any access to an invisible declaration will cause an accessor to be generated _in the same file_. Moreover, it's declared in the group of phases that are performed by file. But this assumption is incorrect for constructors which need to be hidden (those which take parameters of inline class types), since such constructor is public and can be called from anywhere. In this case, SyntheticAccessorLowering actually generated a new accessor for the hidden constructor for each (!) source file where that constructor is called, which led to ClassFormatError because of the class file having multiple methods with the same signature. The internal `functionMap` cache didn't help because it's not shared among phase instances for different files (well, it helped to generate not more than one accessor per usage-file). In this change, we use the global cache, stored in JvmBackendContext, for accessors to hidden constructors. Note that after this change, calls to hidden constructors are always transformed to the corresponding accessor in SyntheticAccessorLowering right away, but that accessor might be orphaned for a while (not declared in any parent's declarations). Only when SyntheticAccessorLowering encounters the original constructor which needs to be hidden, it adds the accessor beside it. The test is sensitive to the file order, so both variants are added.