@@ -21,6 +21,7 @@ extension String: ConjureRemoteValue {
21
21
static func conjureValue( ) -> String { " " }
22
22
}
23
23
24
+ @available ( SwiftStdlib 5 . 1 , * )
24
25
func remoteCall< Result: ConjureRemoteValue > ( function: String , arguments: [ String : Any ] ) async throws -> Result {
25
26
let printedArgs = arguments. keys. sorted ( ) . map { key in
26
27
" \( key) : \( arguments [ key] !) "
@@ -29,16 +30,19 @@ func remoteCall<Result: ConjureRemoteValue>(function: String, arguments: [String
29
30
return Result . conjureValue ( )
30
31
}
31
32
33
+ @available ( SwiftStdlib 5 . 1 , * )
32
34
@Remote
33
35
func f( a: Int , b: String ) async throws -> String
34
36
35
37
38
+ @available ( SwiftStdlib 5 . 1 , * )
36
39
@Remote
37
40
func g( a: Int , b: String ) async throws -> String {
38
41
doesNotTypeCheck ( )
39
42
}
40
43
41
44
#if compiler(>=5.11) && TEST_DIAGNOSTICS
45
+ @available ( SwiftStdlib 5 . 1 , * )
42
46
@Remote
43
47
func h( a: Int , b: String ) async throws -> String {
44
48
does not
@@ -47,8 +51,10 @@ func h(a: Int, b: String) async throws -> String {
47
51
}
48
52
#endif
49
53
50
- // CHECK: Remote call f(a: 5, b: Hello)
51
- print ( try await f ( a: 5 , b: " Hello " ) )
54
+ if #available( SwiftStdlib 5 . 1 , * ) {
55
+ // CHECK: Remote call f(a: 5, b: Hello)
56
+ print ( try await f ( a: 5 , b: " Hello " ) )
52
57
53
- // CHECK: Remote call g(a: 5, b: World)
54
- print ( try await g ( a: 5 , b: " World " ) )
58
+ // CHECK: Remote call g(a: 5, b: World)
59
+ print ( try await g ( a: 5 , b: " World " ) )
60
+ }
0 commit comments