Skip to content

Commit 5ae15dc

Browse files
committed
Xcode6.1 compatibility fix
fixing the Xcode6.1-incompatible if with multiple let declarations
1 parent 3947ff8 commit 5ae15dc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

JSONHelper/JSONHelper.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,10 @@ public func <-- <T: RawRepresentable>(inout property: T?, value: AnyObject?) ->
489489
var newEnumValue: T?
490490
var newRawEnumValue : T.RawValue?
491491
newRawEnumValue <-- value
492-
if let unwrappedNewRawEnumValue = newRawEnumValue, enumValue = T(rawValue: unwrappedNewRawEnumValue) {
493-
newEnumValue = enumValue
492+
if let unwrappedNewRawEnumValue = newRawEnumValue {
493+
if let enumValue = T(rawValue: unwrappedNewRawEnumValue) {
494+
newEnumValue = enumValue
495+
}
494496
}
495497
property = newEnumValue
496498
return property

0 commit comments

Comments
 (0)