168c692a27
Note that LazyClassMemberScope actually has a separate field for KotlinTypeRefiner, and it might be actually different from the one in c.kotlinTypeChecker. The one in c.kotlinTypeChecker is the refiner of *owner* module, i.e. a module in which the class has been declared. If we have a class Foo : Expect in common, then the refiner will be from common, and thus it won't be able to refine supertypes to their platform-dependent values. The one passed in constructor is actual refiner of dependant-module. Say, if we're looking at Foo from the point of view of jvmMain, then we'll create a (view-dependent) LCMS for that, and it will contain refiner for jvmMain. It is important to use proper refiner, otherwise the idea of having "module-dependent view" breaks, and we might suddenly mismatch some overrides with expect-classes in their signatures. ^KT-44898 Fixed