In case of TRAIT_IMPL the incorrect this was written. Reuse the code from the common mapSignature #KT-3413 Fixed
jvmSignature.getAsmMethod() and functionOriginal are supposed to be the same entity, so move jvmSignature out of the way to where it's needed
Use early returns, rename some variables, etc
Extract some methods
Up to this point, front-end did not suspect that there could be classes which have both a class object and a package for static members. Since this became possible for enums loaded from Java binaries (enum entries and valueOf()/ values() are placed into the class object, and every other static member into the package), we adjust the corresponding scope to also include members from the corresponding package #KT-2990 Fixed
For static members, a corresponding package is now created for every enum, as it's done for every other class. All static members of enum classes are resolved into the package, EXCEPT its enum entries, valueOf() and values() methods, which are put into the enum's class descriptor.
Out of three methods, two were incorrect
…called for all expressions
…est. #KT-3398 Fixed
…ptorImpl, since it's always false.