c9461a3827
- The cause for KTIJ-24206 is that the `expect` function's parent is an `IrFile` instead of an `IrClass`. This is because `ExpectDeclarationsRemoveLowering` removes `expect` declarations before `FileClassLowering` can replace `IrFile` parents. - That behavior is normally okay, but breaks down when an `expect` declaration has no associated `actual` declaration. In such cases, `ExpectDeclarationsRemoveLowering` doesn't replace `expect` symbols in expressions with their corresponding `actual` symbols, as it normally would. - The solution fills in `ExpectDeclarationsRemoveLowering`'s behavior by replacing `expect` symbols for which no `actual` symbols exist with stubs. See `stubOrphanedExpectSymbols`. - To not mess with the lowerings, `stubOrphanedExpectSymbols` is invoked during IR generation. It uses the same `ExpectSymbolTransformer` as `ExpectDeclarationRemover`. ^KTIJ-24206 fixed