- The semantics of a non-static declared member scope should be as
follows: For a variable `c: C` of class type `C`, the declared member
scope should contain all members `x` accessible as `c.x` (visibility
notwithstanding) which are *also* explicitly declared in `C`.
- Classifiers are not accessible as properties of a variable `c`, only
as static members of the class `C` itself, so non-static declared
member scopes should not contain any classifiers.
^KT-61800
This is needed because in order to figure out which declarations are
visible from anonymous objects in terms of overridability (see
`FirVisibilityChecker.isVisibleForOverriding`), we need to get the
package name of that anonymous object, because there's package-private
visibility on JVM.
#KT-62017 Fixed