Skip to content

Commit

Permalink
Merge pull request #121 from bustoutsolutions/issue-120
Browse files Browse the repository at this point in the history
Workaround for Swift bug taking type(of:) existentials
  • Loading branch information
pcantrell authored Oct 6, 2016
2 parents 0903526 + 69c5a49 commit ec8dbec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Source/Siesta/Support/ARC+Siesta.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ internal struct StrongOrWeakRef<T>
init(_ value: T)
{
strongRef = value
weakRef = isObject(value)
? value as AnyObject?
: nil
weakRef = value as AnyObject
// More performant version of previous line, once
// https://bugs.swift.org/browse/SR-2867 is fixed:
// weakRef = isObject(value)
// ? value as AnyObject?
// : nil
}

var strong: Bool
Expand Down

0 comments on commit ec8dbec

Please sign in to comment.