Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3384f70

Browse files
committedJan 9, 2019
Add 'less than' operator in compilation conditions Swift 5.0
1 parent a799be2 commit 3384f70

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
 

‎codes/LessThanOperatorSwift5.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Support 'less than' operator in compilation conditions Swift 5.0
2+
3+
// Proposal: SE-0224
4+
// This proposal augments the functionality implemented for proposal SE-0020
5+
// with the introduction of a new valid operator in compilation condition:
6+
// "<". The aim is that the syntax #if swift(<4.2) is supported by the language.
7+
8+
#if !swift(>=4.2)
9+
// This will only be executed if the Swift version is less than 4.2.
10+
#endif
11+
12+
#if !compiler(>=4.2)
13+
// This will only be executed if the Swift compiler version is less than 4.2.
14+
#endif
15+
16+
#if swift(<4.2)
17+
// This will only be executed if the Swift version is less than 4.2.
18+
#endif
19+
20+
#if compiler(<4.2)
21+
// This will only be executed if the Swift compiler version is less than 4.2.
22+
#endif
308 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.