Files
swift-mirror/test/SILGen/variadic_generic_keypath_descriptors.swift
Slava Pestov 8a07466938 SIL: Fix SubstFunctionTypePatternVisitor handling of pack types
The included test case also covers the previous commit.
2023-07-19 16:24:27 -04:00

16 lines
631 B
Swift

// RUN: %target-swift-emit-silgen -enable-library-evolution -disable-availability-checking %s | %FileCheck %s
// rdar://problem/112474421
public struct G<each T> {
public var property1: (repeat each T) -> ()
public var property2: ((repeat each T)) -> ()
public var property3: (G<repeat each T>) -> ()
}
// We don't attempt to emit a keypath descriptor for property1 and property2,
// and we shouldn't crash while emitting a keypath descriptor for property3.
// CHECK-NOT: sil_property #G.property1<each τ_0_0>
// CHECK-NOT: sil_property #G.property2<each τ_0_0>
// CHECK-LABEL: sil_property #G.property3<each τ_0_0>