Files
swift-mirror/test/SILGen/variadic_generic_allocating_init.swift
Kavon Farvardin d2bd562799 Test: send shadow RUN lines to /dev/null
The opaque values test coverage I initially added will emit to
stdout, which is noisy for people's logs if the test is failing for
some other reason.
2026-06-30 17:40:48 -07:00

21 lines
1.1 KiB
Swift

// FIXME: crashes under opaque values
// RUN: not --crash %target-swift-emit-silgen-ossa -o /dev/null -enable-sil-opaque-values %s -target %target-swift-5.9-abi-triple
// RUN: %target-swift-emit-silgen %s -target %target-swift-5.9-abi-triple | %FileCheck %s
class C<each T> {
var values: (repeat each T)
// CHECK-LABEL: sil hidden [exact_self_class] [ossa] @$s32variadic_generic_allocating_init1CC9fromTupleACyxxQp_QPGxxQp_t_tcfC : $@convention(method) <each T> (@pack_owned Pack{repeat each T}, @thick C<repeat each T>.Type) -> @owned C<repeat each T> {
// CHECK: bb0(%0 : $*Pack{repeat each T}, %1 : $@thick C<repeat each T>.Type):
init(fromTuple: (repeat each T)) {
self.values = fromTuple
}
// CHECK-LABEL: sil hidden [exact_self_class] [ossa] @$s32variadic_generic_allocating_init1CC8fromPackACyxxQp_QPGxxQp_tcfC : $@convention(method) <each T> (@pack_owned Pack{repeat each T}, @thick C<repeat each T>.Type) -> @owned C<repeat each T> {
// CHECK: bb0(%0 : $*Pack{repeat each T}, %1 : $@thick C<repeat each T>.Type):
init(fromPack: repeat each T) {
self.values = (repeat each fromPack)
}
}