Skip to content

Commit 4220c7a

Browse files
authored
fix #if AsyncAwait check (#1791)
Motivation: I accidentally put in the wrong check for A/A, thanks @theMomax for spotting! Modification: Fix the check to be ``` #if compiler(>=5.4) // we cannot write this on one line with `&&` because Swift 5.0 doesn't like it... #if compiler(>=5.4) && $AsyncAwait ``` which works on Swift 5.0+. Result: Correct checks.
1 parent 75b52ab commit 4220c7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/_NIOConcurrency/Helpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import NIO
1616

1717
// note: We have to define the variable `hasAsyncAwait` here because if we copy this code into the property below,
1818
// it doesn't compile on Swift 5.0.
19-
#if compiler(>=5.4)
2019
#if compiler(>=5.4) // we cannot write this on one line with `&&` because Swift 5.0 doesn't like it...
20+
#if compiler(>=5.4) && $AsyncAwait
2121
fileprivate let hasAsyncAwait = true
2222
#else
2323
fileprivate let hasAsyncAwait = false

0 commit comments

Comments
 (0)