mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Since these features are experimental features, they can't be catagorized as "baseline" features. However, there is no need to guard code in swiftinterfaces that potentially uses syntax related to these features since all supported compilers can parse the syntax.
14 lines
857 B
Swift
14 lines
857 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-emit-module-interface(%t/LayoutPrespec.swiftinterface) %s -enable-experimental-feature LayoutPrespecialization -module-name LayoutPrespec -disable-availability-checking
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/LayoutPrespec.swiftinterface) -module-name LayoutPrespec -disable-availability-checking
|
|
// RUN: %target-swift-typecheck-module-from-interface(%t/LayoutPrespec.swiftinterface) -module-name LayoutPrespec -enable-experimental-feature LayoutPrespecialization -disable-availability-checking
|
|
// RUN: %FileCheck %s < %t/LayoutPrespec.swiftinterface
|
|
|
|
// CHECK: @_specialize(exported: true, kind: full, where @_noMetadata A : _Class)
|
|
// CHECK-NEXT: public func test<A>(a: A) -> A
|
|
@_specialize(exported: true, where @_noMetadata A : _Class)
|
|
public func test<A>(a: A) -> A {
|
|
return a
|
|
}
|