Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for Swift 2.0 compiler issue (Fixes #406)
I cannot avoid committing this into `master`, as Xcode 7.0 is not in beta anymore, and a fix is not expected anytime soon. The compiler bug was reported to Apple.
- Loading branch information
0a97041
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielgindi _fillFormatter is defined as variable, but creating a constant and assign it to _fillFormatter variable, will swift help to do the proper convention? Like in Objc
mutableCopy
.I know Xcode warns me if I use
var
instead oflet
, but I am still a little worried...0a97041
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends if it's a reference type or a value type. I believe this is a class so it won't copy. Just point the same pointer to another location.
var
andlet
have nothing to do with copying.0a97041
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day I'm gonna go through this and remove all those
!
. Everytime I see one I think "there's a crash waiting to happen"0a97041
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petester42 thanks for explaining!
0a97041
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0a97041
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya I know for this it has no relation. In this case it should probably be a two stage initialization or lazy initialization