Swift-frontend process hangs at compile with optimization

Hello all. I faced problem with build my project on xcode 15.2 ( there was no problem for xcode 14 ). When I try to build one of my module, swift compiler just hangs, and doesn't continue compile. I killed swift-frontend process, and xcode show me next error:

0  swift-frontend           0x00000001055c9abc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x000000010822fcb0 llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x0000000107f99054 SignalHandler(int) + 352
3  libsystem_platform.dylib 0x000000019a092a24 _sigtramp + 56
4  swift-frontend           0x00000001060ce290 swift::ProtocolConformanceRef::subst(swift::Type, swift::InFlightSubstitution&) const + 700
5  swift-frontend           0x00000001060ce290 swift::ProtocolConformanceRef::subst(swift::Type, swift::InFlightSubstitution&) const + 700
6  swift-frontend           0x00000001061a60b8 swift::SubstitutionMap::subst(swift::InFlightSubstitution&) const + 400
7  swift-frontend           0x00000001061a5994 swift::SubstitutionMap::subst(llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<swift::ProtocolConformanceRef (swift::CanType, swift::Type, swift::ProtocolDecl*)>, swift::SubstOptions) const + 336
8  swift-frontend           0x0000000107e78760 swift::SILCombiner::createApplyWithConcreteType(swift::FullApplySite, llvm::SmallDenseMap<unsigned int, swift::ConcreteOpenedExistentialInfo, 4u, llvm::DenseMapInfo<unsigned int, void>, llvm::detail::DenseMapPair<unsigned int, swift::ConcreteOpenedExistentialInfo>> const&, swift::SILBuilderContext&) + 2524
9  swift-frontend           0x00000001054022a4 swift::SILCombiner::propagateConcreteTypeOfInitExistential(swift::FullApplySite) + 224
10 swift-frontend           0x0000000107e7d754 swift::SILCombiner::visitApplyInst(swift::ApplyInst*) + 5224
11 swift-frontend           0x0000000107d87f90 swift::SILCombiner::doOneIteration(swift::SILFunction&, unsigned int) + 6508
12 swift-frontend           0x0000000107df5860 (anonymous namespace)::SILCombine::run() (.llvm.1402185865546273884) + 3928
13 swift-frontend           0x0000000107bd7c5c swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 3988
14 swift-frontend           0x0000000107bcc9d0 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 240
15 swift-frontend           0x0000000107d7a1c4 swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 56
16 swift-frontend           0x0000000107c1c6b8 llvm::Expected<swift::ExecuteSILPipelineRequest::OutputType> swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest>(swift::ExecuteSILPipelineRequest const&) + 476
17 swift-frontend           0x0000000107c34424 swift::runSILOptimizationPasses(swift::SILModule&) + 472
18 swift-frontend           0x0000000105bc43c0 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 572
19 swift-frontend           0x0000000107b11454 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 956
20 swift-frontend           0x0000000107b0cf00 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 3020
21 swift-frontend           0x0000000107b10854 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4568
22 swift-frontend           0x0000000107b77d44 swift::mainEntry(int, char const**) + 4408
23 dyld                     0x0000000199d0bf28 start + 2236
Command SwiftCompile failed with a nonzero exit code

I found problematic place, it related with generics, but I doesn't understand why on xcode 14 everything is fine, but on xcode 15 - not.
Could you please help me, and explai what this error is mean

Hello again. I found problematic place, let's me describe how it was before, and how I fix it, hope anyone can explain why I get such behaviour with compiler hang

Old implementation:
class A: store FRCService instance, declaration:

class A {
    private lazy var frcService: FRCService<MyModelDTO> = {
     return FRCServiceAssembler.makeService(request: { _ in })
    }()
}

class B: assembler that create FRCService instance, declaration

FRCServiceAssembler<DTO: ManagedObjectMapperWithRelationship> {
  static func makeService(
        request: FRCWrapper<DTO>.RequestBuilder
    ) -> FRCService<DTO> {
        return FRCService<DTO>(
            storage: makeStorage(),
            request: request
        )
    }
}

class C: FRC service, declaration

class FRCService<DTO: ManagedObjectMapperWithRelationship>: NSObject {
    init(
        storage: StorageDTOProtocol,
        request: FRCWrapper<DTO>.RequestBuilder
    ) {
        super.init()
        
        fetchedResultsController = storage.makeFRCWrapperWithRelationships(
            sectionNameKeyPath: nil,
            requestBuilder: request
        )
    }
}

in this implementation, I had compile hang, to resolve this proble, I just remove using FRCServiceAssembler, and create FRCService instance directly in class A, so, to make compile work, I just change code in class A to next:

class A {
    private lazy var frcService: FRCService<MyModelDTO> = {
        return FRCService(storage: StorageDTO(
            storage: CoreDataStorage.shared
        ), request: { _ in })
    }()
}

with this changes, there is no any problem with compiler, could anyone explain it pls?