- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathasync-inheritance.swift
34 lines (29 loc) · 845 Bytes
/
async-inheritance.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
28
29
30
31
32
33
34
// RUN: %empty-directory(%t)
// RUN: %target-build-swift-dylib(%t/%target-library-name(L)) -target %target-swift-5.1-abi-triple -module-name L -emit-module -emit-module-path %t/L.swiftmodule %s -DL
// RUN: %target-build-swift -target %target-swift-5.1-abi-triple -I%t -L%t -lL -parse-as-library %s -module-name E -o %t/E %target-rpath(%t)
// RUN: %target-codesign %t/E
// RUN: %target-codesign %t/%target-library-name(L)
// RUN: %target-run %t/E %t/%target-library-name(L) | %FileCheck %s
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime
// REQUIRES: executable_test
// UNSUPPORTED: back_deployment_runtime
#if L
openclassC{
publicinit(){}
openfunc f()async{
print("\(#function)")
}
}
#else
import L
classD:C{
}
@main
structS{
publicstaticfunc main()async{
awaitD().f()
}
}
#endif
// CHECK: f()