- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathtypealias.swift
27 lines (21 loc) · 1.13 KB
/
typealias.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t/typealias.swiftmodule %s -disable-objc-attr-requires-foundation-module
// RUN: %target-swift-frontend -parse-as-library %t/typealias.swiftmodule -typecheck -verify -emit-objc-header-path %t/typealias.h -disable-objc-attr-requires-foundation-module
// RUN: %FileCheck %s < %t/typealias.h
// RUN: %check-in-clang %t/typealias.h
// RUN: %target-swift-frontend %s -typecheck -verify -emit-objc-header-path %t/typealias_wmo.h -disable-objc-attr-requires-foundation-module
// RUN: %FileCheck %s < %t/typealias_wmo.h
// RUN: %check-in-clang %t/typealias_wmo.h
// REQUIRES: objc_interop
publictypealiasActuallyGeneric<T>=T
publicstructGenericHelper<T>{
publictypealiasTheType=T
}
publictypealiasPassesThroughGeneric=GenericHelper<Int>.TheType
// CHECK-LABEL: @interface X
@objcpublicclassX{
// CHECK: @property (nonatomic) NSInteger actuallyGeneric;
@objcpublicvaractuallyGeneric:ActuallyGeneric<Int>=0
// CHECK: @property (nonatomic) NSInteger passesThroughGeneric;
@objcpublicvarpassesThroughGeneric:PassesThroughGeneric=0
} // CHECK: @end