Files
swift-mirror/test/Generics/rdar160804717.swift
Slava Pestov b8d0ba9732 AST: Fix substOpaqueTypesWithUnderlyingTypes() to set SubstFlags::PreservePackExpansionLevel
The "iterate until fixed point" would cause an infinite loop where we
wrap type parameter packs in a PackElementType and increase the level
forever otherwise.

This was a regression from commit 103428fe80.

Fixes rdar://160804717.
2025-10-23 15:36:53 -04:00

28 lines
694 B
Swift

// RUN: %target-swift-frontend -emit-ir %s -target %target-swift-5.9-abi-triple
// REQUIRES: objc_interop
// This used to trigger an infinite loop in conformance substitution
// when emitting the opaque type descriptor in IRGen.
// rdar://160804717
import SwiftUI
public struct CategorySplitView<each Destination: View>: View {
let titleKey: LocalizedStringKey
let groups: (repeat each Destination)
public var body: some View {
TupleView((repeat CategoryGroupSidebar(group: each groups))).navigationTitle(titleKey)
}
}
public struct CategoryGroupSidebar<Destination>: View {
let group: Destination
public var body: some View {
Text("Hi")
}
}