We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some questions allow the creation of an empty array with var array:[String] = [], while some would need var array:[String] = [String]() to be valid.
var array:[String] = []
var array:[String] = [String]()
The text was updated successfully, but these errors were encountered:
This is solved by code - see Unwrap/Extensions/String-Variables.swift (line 102) https://github.com/twostraws/Unwrap/blob/main/Unwrap/Extensions/String-Variables.swift
// If folks use explicit type annotation for a collection backed up by an empty initializer, prefer removing the annotation.
replaced = replaced.replacingOccurrences(of: #":\[([A-Za-z]+)\] *= *\[\]"#, with: " = [$1]()", options: .regularExpression)
Sorry, something went wrong.
No branches or pull requests
Some questions allow the creation of an empty array with
var array:[String] = []
, while some would needvar array:[String] = [String]()
to be valid.The text was updated successfully, but these errors were encountered: