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
SR-6913 Default arguments are not evaluated correctly in larger expression
Issue Description:
I've been using a custom `fatalError` that I can catch and automatically send a report to myself. Something along this:
public func XUFatalError(_ additionalInformation: String = "", file: String = #file.components(separatedBy: "/").last!, line: Int = #line, method: String = #function) -> Never {
// Gather this and send it.
}
When this is called, the #file is incorrectly always the name of the file that contains this function - however, removing `.components(separatedBy: "/").last!`, i.e. the default argument being simply `#file` correctly passes in the file of the caller.
The text was updated successfully, but these errors were encountered:
Environment
macOS 10.13.3, Xcode 9.3b3
Additional Detail from JIRA
md5: 95f7cf6745624d5e72b03540a1b25ba4
duplicates:
Issue Description:
I've been using a custom `fatalError` that I can catch and automatically send a report to myself. Something along this:
When this is called, the #file is incorrectly always the name of the file that contains this function - however, removing `.components(separatedBy: "/").last!`, i.e. the default argument being simply `#file` correctly passes in the file of the caller.
The text was updated successfully, but these errors were encountered: