Files
swift-mirror/test/DebugInfo/value-generics.swift
Daniel Rodríguez Troitiño ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00

24 lines
977 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -enable-builtin-module -enable-experimental-feature ValueGenerics -disable-experimental-parser-round-trip -disable-availability-checking -o - | %FileCheck %s
// REQUIRES: swift_feature_ValueGenerics
import Builtin
struct Vector<let N: Int, Element: ~Copyable>: ~Copyable {
let storage: Builtin.FixedArray<N, Element>
}
extension Vector: Copyable where Element: Copyable {}
// CHECK-DAG: !DICompositeType({{.*}}name: "Builtin.FixedArray", {{.*}}identifier: "$sxq_BVD"
func genericBA<let N: Int, Element>(_: Builtin.FixedArray<N, Element>) {}
// CHECK-DAG: !DICompositeType({{.*}}name: "$s4main6VectorVyxq_GD"
func genericV<let N: Int, Element>(_: Vector<N, Element>) {}
// CHECK-DAG: !DICompositeType({{.*}}name: "Builtin.FixedArray", {{.*}}identifier: "$s$3_SiBVD"
func concreteBA(_: Builtin.FixedArray<4, Int>) {}
// CHECK-DAG: !DICompositeType({{.*}}name: "$s4main6VectorVy$1_SiGD"
func concreteV(_: Vector<2, Int>) {}