mirror of
https://github.com/apple/swift.git
synced 2026-10-06 12:37:28 +02:00
These tests pass -disable-availability-checking to silence diagnostics about value generics and InlineArray, which require the Swift 6.2 runtime. Pass -target %target-swift-6.2-abi-triple instead.
14 lines
561 B
Swift
14 lines
561 B
Swift
// RUN: %target-swift-frontend -target %target-swift-6.2-abi-triple -emit-sil -O %s | %FileCheck %s
|
|
//
|
|
public struct Foo<let count: Int> {
|
|
// CHECK-LABEL: sil{{.*}} @$s{{.*}}3FooV3bar
|
|
// CHECK: [[PARAM_VAL:%.*]] = type_value $Int for count
|
|
// CHECK: [[SPEC_INT:%.*]] = integer_literal ${{.*}}, 3
|
|
// CHECK: [[PARAM_INT:%.*]] = struct_extract [[PARAM_VAL]], #Int._value
|
|
// CHECK: builtin "cmp_eq_Int{{.*}}"([[PARAM_INT]], [[SPEC_INT]])
|
|
@specialized(where count == 3)
|
|
public func bar() -> Int {
|
|
return count
|
|
}
|
|
}
|