You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though it's also a type name and confuses the code coloring in Xcode, "id" is a valid variable name in Objective-C and I've used it quite a bit. This should be even less of a problem in Swift because it's not a type name, but Swiftify renames my "id" variables to "anId":
input: NSString *id = @"foo";
output: let anId = "foo"
expected: let id = "foo"
demo: http://swiftify.me/i8a32t
Similarly:
input: for (NSString *id in sortedEvents) {}
output: for anId in sortedEvents {}
expected: for id in sortedEvents {}
I noticed the same behavior with variables named "url" being changed to "anUrl." I think in both languages, "URL" is a type, but "url" is a valid variable name.
The text was updated successfully, but these errors were encountered:
Even though it's also a type name and confuses the code coloring in Xcode, "id" is a valid variable name in Objective-C and I've used it quite a bit. This should be even less of a problem in Swift because it's not a type name, but Swiftify renames my "id" variables to "anId":
input: NSString *id = @"foo";
output: let anId = "foo"
expected: let id = "foo"
demo: http://swiftify.me/i8a32t
Similarly:
input: for (NSString *id in sortedEvents) {}
output: for anId in sortedEvents {}
expected: for id in sortedEvents {}
I noticed the same behavior with variables named "url" being changed to "anUrl." I think in both languages, "URL" is a type, but "url" is a valid variable name.
The text was updated successfully, but these errors were encountered: