- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathlayout_pre_specialization.swift
15 lines (13 loc) · 942 Bytes
/
layout_pre_specialization.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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: #if compiler(>=5.3) && $LayoutPrespecialization
// CHECK-NEXT: @_specialize(exported: true, kind: full, where @_noMetadata A : _Class)
// CHECK-NEXT: public func test<A>(a: A) -> A
// CHECK-NEXT: #endif
@_specialize(exported:true, where @_noMetadataA: _Class)
publicfunc test<A>(a:A)->A{
return a
}