diff options
author | Evan <JustBlah@users.noreply.github.com> | 2016-10-01 23:33:04 +0300 |
---|---|---|
committer | ven <vendethiel@hotmail.fr> | 2016-10-01 22:33:04 +0200 |
commit | 9234c9fea4d2db040e73def518117f4135d71940 (patch) | |
tree | 829e526f89bdd101b7c758b75f0cf9d37e667188 /swift.html.markdown | |
parent | a8704d313b8dcb97ba105da474293ad0d6adf9dd (diff) |
Update Swift pre-decrement syntax to match v3.0 (#2395)
Diffstat (limited to 'swift.html.markdown')
-rw-r--r-- | swift.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/swift.html.markdown b/swift.html.markdown index e921e7ea..2fc92da7 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -94,7 +94,7 @@ var unwrappedString: String! = "Value is expected." // same as above, but ! is a postfix operator (more syntax candy) var unwrappedString2: ImplicitlyUnwrappedOptional<String> = "Value is expected." -// If let structure - +// If let structure - // If let is a special structure in Swift that allows you to check if an Optional rhs holds a value, and in case it does - unwraps and assigns it to the lhs. if let someOptionalStringConstant = someOptionalString { // has `Some` value, non-nil @@ -443,7 +443,7 @@ internal class Rect: Shape { func shrink() { if sideLength > 0 { - --sideLength + sideLength -= 1 } } |